Transient Sorption Models

All transient models share the following functionality

MembraneBase.rssMethod
MembraneBase.rss(sorptionmodel::TransientSorptionModel, step_data::TransientStepData)

Determine how well a model predicts transient sorption by the sum of squared residuals.

source
SorptionModels.fit_transient_sorption_modelMethod
fit_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: See TransientStepDatain MembraneBase.jl
  • model: Type of transient sorption model to fit the step_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: See resample in TransientStepData.
  • interpolation_datapoints::Integer: Number of data points to interpolate to, see above.
  • uncertainty_method: currently only supports nothing 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.
  • 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.
source
SorptionModels.get_diffusivityMethod
get_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.
source
SorptionModels.predict_sorptionMethod
predict_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.

Note

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.

source