Transient Sorption Models
All transient models share the following functionality
MembraneBase.rss
— MethodMembraneBase.rss(sorptionmodel::TransientSorptionModel, step_data::TransientStepData)
Determine how well a model predicts transient sorption by the sum of squared residuals.
SorptionModels.fit_transient_sorption_model
— Methodfit_transient_sorption_model(
step_data::TransientStepData, model; custom_initial_params=nothing, interpolation_method=nothing, interpolation_datapoints=1000,
uncertainty_method=nothing, num_uncertainty_resamples=20, resampling_mode=false)
Arguments
step_data::TransientStepData
: SeeTransientStepData
in MembraneBase.jlmodel
: Type of transient sorption model to fit thestep_data
to. Available options are:FickianSorption()
BerensHopfenbergSorption()
ModifiedBerensHopfenbergSorption()
Optional Arguments
custom_initial_params::Vector
: Vector of initial guesses to start with. Must match the number of parameters in the model.- These parameters are linearized in their parameter space. Make sure you understand the linearization of the model parameters before you try to specify custom initial guesses.
interpolation_method
: Seeresample
inTransientStepData
.interpolation_datapoints::Integer
: Number of data points to interpolate to, see above.uncertainty_method
: currently only supportsnothing
and the:Bootstrap
method of determining uncertainty.num_uncertainty_resamples
: Number of times to resample for determining the uncertainty of the model fit (if applicable).- e.g., for
:Bootstrap
, this would be the number of times the data is randomly resampled and refit.
- e.g., for
resampling_mode
: For internal use with Optim.jl and resampling. Do not modify this value.- This will return the linearized parameter fittings in lieu of the normal model objects.
SorptionModels.get_diffusivity
— Methodget_diffusivity(model::TransientSorptionModel, semi_thickness_cm::Number)
Get the diffusivity of the polymer described by the transient sorption model.
- The semi-thickness (half of the polymer thickness, in cm) of the polymer used to collect the sorption data is required.
SorptionModels.predict_sorption
— Methodpredict_sorption(sorptionmodel::TransientSorptionModel, time_seconds::AbstractVector{<:Number})
Predict the amount of dimensionless sorption that has occurred at time time_seconds
according to the transient sorption model.
You can also specify a single time instead of a vector of times. When predicting this way, you can additionally use the keyword argument iters
, which will change the default number of iterations used to solve the transient sorption prediction. It is not recommended to modify this default value.