All Docstrings

Types

LyoPronto.PrimaryDryFitType

PrimaryDryFit: a type for indicating how experimental data should be fit.

Provided constructors:

PrimaryDryFit(t, Tfs, Tvws, t_end)
PrimaryDryFit(t, Tfs; Tvws=missing, t_end=missing) = PrimaryDryFit(t, Tfs, Tvws, t_end)

Note that Tvws and t_end in the second constructors are keyword arguments, so either or both can be left out.

The use of this struct is determined in large part by the implementation of LyoPronto.obj_expT and LyoPronto.err_expT!. If a given field is not available, it will be set to missing and things should basically work. At least t and Tfs are expected to always be provided.

In the end, Tfs and Tvws are each stored as a tuple of vectors, but the constructors try to be flexible about allowing a single vector to be passed in place of a tuple of vectors.

The fields Tf_iend and Tvw_iend default to [length(Tf) for Tf in Tfs] and [length(Tvw) for Tvw in Tvws], respectively, with one value for each temperature series; they are used to dictate if a given temperature series should be truncated sooner than the full length in the fitting procedure. This implies that all the temperature series correspond to the same time points, then stop having measured values after a different number of measurements. If a single value is given for Tvws, then it is taken to be an endpoint, and Tvw_iend will be missing.

t_end indicates an end of drying, particularly if taken from other measurements (e.g. from Pirani-CM convergence). If set to missing, it is ignored in the objective function. If set to a tuple of two times, then in the objective function any time in that window is not penalized; outside that window, squared error takes over, as for the single time case.

Principal Cases:

  • Conventional: provide only t, Tfs
  • Conventional with Pirani ending: provide t, Tfs; t_end=...
  • RF with measured vial wall: provide t, Tfs; Tvws=...,
  • RF, matching model Tvw to experimental Tf[end] without measured vial wall: provide t, Tfs, Tvws=...
source
LyoPronto.RampedVariableType

A convenience type for computing temperatures, pressures, etc. with multiple setpoints in sequence, and linear interpolation according to a fixed ramp rate between set points

Three main constructors are available: For a non-varying value, call with one argument:

RampedVariable(constant_setpt)

For one ramp from initial value to set point with indefinite hold, call with two arguments:

RampedVariable(setpts, ramprate)

And for multiple setpoints, call with three arguments:

RampedVariable(setpts, ramprates, holds)

With three arguments, setpts, ramprates, and holds should all be vectors, with lengths N+1, N, N-1 respectively.

The resulting RampedVariable rv = RampedVariable(...) can be called as rv(x) at any (dimensionally consistent) value of x, and will return the value at that time point along the ramp process.

A plot recipe is also provided for this type, e.g. plot(rv; tmax=10u"hr") where tmax indicates where to stop drawing the last setpoint hold.

source
LyoPronto.RpFormFitType

A convenience type for dealing with the common functional form given to Rp and Kv.

An object Rp = RpFormFit(A, B, C) can be called as Rp(x), which simply computes A + B*x/(1 + C*x). Likewise, Kv = RpFormFit(Kc, Kp, Kd) can be called as Kv(p) to get Kc + Kp*p/(1 + Kd*p).

Be careful to pass dimensionally consistent values.

source

Parameter Fitting

LyoPronto.KBB_transform_boundedMethod
KBB_transform_bounded(
    Kvwfg,
    Bfg,
    Bvwg;
    Kvwf_scalefac,
    Bf_scalefac,
    Bvw_scalefac
)

Construct a bounded transform for fitting Kvwf, Bf, and Bvw (as for a microwave cycle).

Kvwf_scalefac, Bf_scalefac, and Bvw_scalefac are used to provide upper and lower bounds on the fitted parameter, as (Kvwfg/Kvwf_scalefac, Kvwfg*Kvwf_scalefac), etc. This is enforced with a logistic transform scaled and shifted appropriately.

source
LyoPronto.err_expT!Method
err_expT!(errs, sol, pdfit; tweight, verbose)

Evaluate the error between model solution sol and experimental data in pdfit.

The in-place version err_expT! fills the errs vector with the errors, while the non-in-place version err_expT returns a new vector of errors. In-place err_expT! thus doesn't allocate, but requires errs to have length num_errs(pdfit).

In contrast to obj_expT(), which sums all the squared residuals, this function fills the passed array errs with each separate residual, which is suited for least squares algorithms.

  • errs is a vector of length num_errs(pdfit), which this function fills with the errors.

-sol is a solution to an appropriate model; see gen_sol_pd for a helper function.

  • pdfit is an instance of PrimaryDryFit, which contains some information about what to compare.
  • tweight = 1 gives the weighting (in K^2/hr^2) of the total drying time in the objective, as compared to the temperature error.

Each time series, plus the end time, is given equal weight by dividing by its length; error is given in K (but ustripped).

Note that if pdfit has vial wall temperatures (i.e. ismissing(pdfit.Tvws) == false), the third-index variable in sol is assumed to be temperature, as is true for solutions with ParamObjRF.

If there are multiple series of Tf in pdfit, error is computed for each separately; likewise for Tvw.

source
LyoPronto.err_expTMethod
err_expT(sol, pdfit; tweight, verbose)

Evaluate the error between model solution sol and experimental data in pdfit.

The in-place version err_expT! fills the errs vector with the errors, while the non-in-place version err_expT returns a new vector of errors. In-place err_expT! thus doesn't allocate, but requires errs to have length num_errs(pdfit).

In contrast to obj_expT(), which sums all the squared residuals, this function fills the passed array errs with each separate residual, which is suited for least squares algorithms.

  • errs is a vector of length num_errs(pdfit), which this function fills with the errors.

-sol is a solution to an appropriate model; see gen_sol_pd for a helper function.

  • pdfit is an instance of PrimaryDryFit, which contains some information about what to compare.
  • tweight = 1 gives the weighting (in K^2/hr^2) of the total drying time in the objective, as compared to the temperature error.

Each time series, plus the end time, is given equal weight by dividing by its length; error is given in K (but ustripped).

Note that if pdfit has vial wall temperatures (i.e. ismissing(pdfit.Tvws) == false), the third-index variable in sol is assumed to be temperature, as is true for solutions with ParamObjRF.

If there are multiple series of Tf in pdfit, error is computed for each separately; likewise for Tvw.

source
LyoPronto.gen_nsol_pdMethod
gen_nsol_pd(fitlog, tr, pos, fitdats; badprms, kwargs...)

Generate multiple solutions at once.

If the transformation tr makes something (e.g. NamedTuple) with properties separate and shared, then one each of separate is combined with shared, then they are matched up with each element of pos and fitdats. If pos is a single object, it is repeated. Further, if tr also has a field sep_inds, then those indices are used to map separate to the sets of pos and fitdats. This is useful for when e.g. 2 sets of separate parameters are to be applied across 5 different experiments.

source
LyoPronto.gen_sol_pdMethod
gen_sol_pd(fitlog, tr, po; saveat, badprms, kwargs...)

Simulate primary drying, given a vector of parameter guesses, a mapping tr from fitlog to named coefficients, and other parameters in po.

The equations used are determined by the type of po, which (with the magic of dispatch) is used to set up an ODE system.

tr should be a TransformTuple object, from TransformVariables, which maps e.g. a vector of 3 real numbers to a NamedTuple with R0, A1, A2 as keys and appropriate Unitful dimensions on the values. This small function runs

fitprm = transform(tr, fitlog)
new_params = setproperties(po, fitprm)
!isnothing(badprms) && badprms(new_params) && return Val(NaN)
prob = ODEProblem(new_params; tspan=(0.0, 1000.0))
sol = solve(prob, Rodas4(autodiff=AutoForwardDiff(chunksize=2)); saveat, kwargs...)

which is wrapped to avoid code duplication.

So, to choose which parameters to fitting, all that is necessary is to provide an appropriate transform tr and add a method of setproperties for the desired parameters. Therefore this function can be used for both K-Rp fitting, or just Rp, or just a subset of the 3 Rp coefficients.

If given, fitdat is used to set saveat for the ODE solution.

Other kwargs are passed directly (as is) to the ODE solve call.

source
LyoPronto.nls_pd!Method
nls_pd!(errs, fitlog, tpf; tweight, verbose)

Calculate the errors for fitting parameters to primary drying data. This directly calls gen_sol_pd, then err_expT!, so see those docstrings.

source
LyoPronto.nls_pdMethod
nls_pd(fitlog, tpf; tweight, verbose)

Calculate the errors for fitting parameters to primary drying data. This directly calls gen_sol_pd, then err_expT, so see those docstrings.

source
LyoPronto.num_errsMethod
num_errs(pdfit)

Compute the number of data points available in pdfit for comparison to model solution.

This is useful for caching a residual vector for least-squares fitting, e.g. with err_expT! and nls_pd!.

source
LyoPronto.obj_expTMethod
obj_expT(sol, pdfit; tweight, verbose, Tvw_weight)

Evaluate an objective function which compares model solution computed by sol to experimental data in pdfit.

  • sol is a solution to an appropriate model; see gen_sol_pd for a helper.
  • pdfit is an instance of PrimaryDryFit, which contains some information about what to compare.
  • tweight = 1 gives the weighting (in K^2/hr^2) of the total drying time in the objective, as compared to the temperature error.
  • Tvw_weight = 1 gives the weighting of Tvw in the objective, as compared to Tf.

Note that if pdfit has vial wall temperatures (i.e. ismissing(pdfit.Tvws) == false), the third-index variable in sol is assumed to be temperature, as is true for the lumped capacitance model (see ParamObjRF`.

If there are multiple series of Tf in pdfit, squared error is computed for each separately then summed; likewise for Tvw.

I've considered writing several methods and dispatching on pdfit somehow, which would be cool and might individually be easier to read. But control flow might be harder to document and explain, and this should work just fine.

source
LyoPronto.obj_pdMethod
obj_pd(fitlog, tpf; tweight, Tvw_weight, badprms, verbose)

Calculate the sum of squared error (objective function) for fitting parameters to primary drying data. This directly calls gen_sol_pd, then obj_expT, so see those docstrings.

source
LyoPronto.identify_pd_endMethod
identify_pd_end(t, pch_pir, kind; window_width, tmin, tmax)

Identify the end of primary drying using second derivative of Pirani pressure.

Arguments

  • t: time points
  • pch_pir: Pirani pressure at given times
  • kind: Val(:der2) for maximum of second derivative, Val(:onoff) for onset and offset.
  • window_width: Width of the Savitzky-Golay filter window (default: 91)
  • tmin: Minimum time for analysis (default: 0 hours, unitful)
  • tmax: Maximum time for analysis (default: Inf hours, unitful)

If a single argument data is passed instead of t and pch_pir, the time and Pirani pressure are assumed to be accessible as either data.t and data.pch_pir or data[:t] and data[:pch_pir].

Approach

Use a Savitzky-Golay filter to smooth and take derivatives. For the onset-offset, find linear intersects of tangent at inflection point with maximum and minimum values of pressure. Those intersects are taken as onset and offset. For the second derivative, identify the maximum of the second derivative.

source

Plot Recipes

LyoPronto.cycledataplotFunction
cycledataplot(tablelike, (Tname1, ...), Tsh_name, (p_name1, ...))
cycledataplot!(tablelike, (Tname1, ...), Tsh_name, (p_name1, ...))

Plot recipe for plotting both temperatures and pressures of a lyophilization cycle.

This requires at least two subplots, one for temperature and one for pressure. Either call twinx(plot()) then cycledataplot!(...), or give a layout like cycledataplot(..., layout=(2,1))"

source
LyoPronto.cycledataplot!Function
cycledataplot(tablelike, (Tname1, ...), Tsh_name, (p_name1, ...))
cycledataplot!(tablelike, (Tname1, ...), Tsh_name, (p_name1, ...))

Plot recipe for plotting both temperatures and pressures of a lyophilization cycle.

This requires at least two subplots, one for temperature and one for pressure. Either call twinx(plot()) then cycledataplot!(...), or give a layout like cycledataplot(..., layout=(2,1))"

source
LyoPronto.exppplotFunction
exppplot(t, p1, [p2, ...,], (name1, [name2, ...]))
exppplot!(t, p1, [p2, ...,], (name1, [name2, ...]))

Plot recipe for plotting pressures of a lyophilization cycle.

source
LyoPronto.exppplot!Function
exppplot(t, p1, [p2, ...,], (name1, [name2, ...]))
exppplot!(t, p1, [p2, ...,], (name1, [name2, ...]))

Plot recipe for plotting pressures of a lyophilization cycle.

source
LyoPronto.exptfplotFunction
exptfplot(time, T1, [T2, ...]; nmarks=0, labsuffix=", exp.")
exptfplot!(time, T1, [T2, ...]; nmarks=0, labsuffix=", exp.")

Plot recipe for one or more experimentally measured product temperatures, all at same times. This recipe adds one series for each passed temperature series, with labels defaulting to "T_{fi}"*labsuffix.

nmarks is an integer, indicating how many points to plot with markers, so that the number of markers is reasonable even with many data points. To plot all points (default), pass nmarks=0.

sampmarks=false (default) will only show markers at selected points, while sampmarks=true will put a line through all points.

source
LyoPronto.exptfplot!Function
exptfplot(time, T1, [T2, ...]; nmarks=0, labsuffix=", exp.")
exptfplot!(time, T1, [T2, ...]; nmarks=0, labsuffix=", exp.")

Plot recipe for one or more experimentally measured product temperatures, all at same times. This recipe adds one series for each passed temperature series, with labels defaulting to "T_{fi}"*labsuffix.

nmarks is an integer, indicating how many points to plot with markers, so that the number of markers is reasonable even with many data points. To plot all points (default), pass nmarks=0.

sampmarks=false (default) will only show markers at selected points, while sampmarks=true will put a line through all points.

source
LyoPronto.exptvwplotFunction
exptvwplot(time, T1, [T2, ...]; skip=1, nmarks=0, labsuffix=", exp.")
exptvwplot!(time, T1, [T2, ...]; skip=1, nmarks=0, labsuffix=", exp.")

Plot recipe for a set of experimentally measured vial wall temperatures. This recipe adds one series for each passed temperature series, with labels defaulting to "T_{vwi}"*labsuffix. skip is an integer, indicating how many points to skip at a time, so that the dotted line looks dotted even with noisy data.

nmarks is an integer, indicating how many points to plot with markers, so that the number of markers is reasonable even with many data points. To plot all points (default), pass nmarks=0.

sampmarks=false (default) will only show markers at selected points, while sampmarks=true will put a line through all points.

source
LyoPronto.exptvwplot!Function
exptvwplot(time, T1, [T2, ...]; skip=1, nmarks=0, labsuffix=", exp.")
exptvwplot!(time, T1, [T2, ...]; skip=1, nmarks=0, labsuffix=", exp.")

Plot recipe for a set of experimentally measured vial wall temperatures. This recipe adds one series for each passed temperature series, with labels defaulting to "T_{vwi}"*labsuffix. skip is an integer, indicating how many points to skip at a time, so that the dotted line looks dotted even with noisy data.

nmarks is an integer, indicating how many points to plot with markers, so that the number of markers is reasonable even with many data points. To plot all points (default), pass nmarks=0.

sampmarks=false (default) will only show markers at selected points, while sampmarks=true will put a line through all points.

source
LyoPronto.modconvtplotFunction
modconvtplot(sols; sampmarks=false, labsuffix = ", model")
modconvtplot!(sols; sampmarks=false, labsuffix = ", model")

Plot recipe for one or multiple solutions to the Pikal model, e.g. the output of gen_sol_pd. This adds a series to the plot for each passed solution, with labels defaulting to "T_{fi}"*labsuffix.

sampmarks=false (default) will only put a line through all points, while sampmarks=true will show markers at selected points.

source
LyoPronto.modconvtplot!Function
modconvtplot(sols; sampmarks=false, labsuffix = ", model")
modconvtplot!(sols; sampmarks=false, labsuffix = ", model")

Plot recipe for one or multiple solutions to the Pikal model, e.g. the output of gen_sol_pd. This adds a series to the plot for each passed solution, with labels defaulting to "T_{fi}"*labsuffix.

sampmarks=false (default) will only put a line through all points, while sampmarks=true will show markers at selected points.

source
LyoPronto.modrftplotFunction
modrftplot(sol, labsuffix=", model", sampmarks=false, trimend=0)
modrftplot!(sol, labsuffix=", model", sampmarks=false, trimend=0)

Plot recipe for one solution to the lumped capacitance model.

This adds two series to the plot, with labels defaulting to ["T_f" "T_{vw}"] .* labsuffix. The optional argument trimend controls how many time points to trim from the end (which is helpful if temperature shoots up as mf -> 0).

Since this is a recipe, any Plots.jl keyword arguments can be passed to modify the plot.

sampmarks=false (default) will only put a line through all points, while sampmarks=true will show markers at selected points.

source
LyoPronto.modrftplot!Function
modrftplot(sol, labsuffix=", model", sampmarks=false, trimend=0)
modrftplot!(sol, labsuffix=", model", sampmarks=false, trimend=0)

Plot recipe for one solution to the lumped capacitance model.

This adds two series to the plot, with labels defaulting to ["T_f" "T_{vw}"] .* labsuffix. The optional argument trimend controls how many time points to trim from the end (which is helpful if temperature shoots up as mf -> 0).

Since this is a recipe, any Plots.jl keyword arguments can be passed to modify the plot.

sampmarks=false (default) will only put a line through all points, while sampmarks=true will show markers at selected points.

source
LyoPronto.pressurenamesMethod
pressurenames(name)

Attempt to catch common names or shorthands for Pirani and capacitance manometer, then give back a nice label.

source
LyoPronto.qrf_integrateMethod
qrf_integrate(sol, RF_params)

Compute the integral over time of each heat transfer mode in the lumped capacitance model.

Returns as a Dict{String, Quantity{...}}, with string keys Qsub, Qshf, Qvwf, QRFf, QRFvw.

source
LyoPronto.tendplotFunction
tendplot(t_end)
tendplot!(t_end)
tendplot(t_end1, t_end2)
tendplot!(t_end1, t_end2)

Plot recipe that adds a labeled vertical line to the plot at time t_end. A default label and styling are applied, but these can be modified by keyword arguments as usual If two time points are passed, a light shading is applied between instead of a vertical line.

source
LyoPronto.tendplot!Function
tendplot(t_end)
tendplot!(t_end)
tendplot(t_end1, t_end2)
tendplot!(t_end1, t_end2)

Plot recipe that adds a labeled vertical line to the plot at time t_end. A default label and styling are applied, but these can be modified by keyword arguments as usual If two time points are passed, a light shading is applied between instead of a vertical line.

source

Vial Dimensions

LyoPronto.get_vial_massMethod
get_vial_mass(vialsize)

Return vial mass for given ISO vial size.

Uses a table from a SCHOTT manual, stored internally in a CSV.

source
LyoPronto.get_vial_radiiMethod
get_vial_radii(vialsize)

Return inner and outer radius for passed ISO vial size.

Uses a table from a SCHOTT manual, stored internally in a CSV.

source
LyoPronto.get_vial_shapeMethod
get_vial_shape(vialsize::String)

Return a NamedTuple with a slew of vial dimensions, useful for drawing the shape of the vial with make_outlines.

Uses a table from a SCHOTT manual, stored internally in a CSV.

source
LyoPronto.get_vial_thicknessMethod
get_vial_thickness(vialsize)

Return vial wall thickness for given ISO vial size.

Uses a table from a SCHOTT manual, stored internally in a CSV.

source
LyoPronto.make_outlinesMethod
make_outlines(dims, Vfill)

Return a sequence of points (ready to be made into Plots.Shapes for the vial and fill volume, with Unitful dimensions, for given vial dimensions.

This is a convenience function for making figures illustrating fill depth.

source

Model Equations

LyoPronto.lyo_1d_dae_fConstant
lyo_1d_dae_f = ODEFunction(lyo_1d_dae!, mass_matrix=lyo_1d_mm)

Compute the right hand side function for the Pikal model.

The DAE system which is the Pikal model (1 ODE, one nonlinear algebraic equation for pseudosteady conditions) is here treated as a constant-mass-matrix implicit ODE system. The implementation is in lyo_1d_dae!

The initial conditions u0 = [h_f, Tf] should be unitless, but are internally assigned to be in [cm, K]. The unitless time is taken to be in hours, so derivatives are given in unitless [cm/hr, K/hr].

params is a ParamObjPikal, which can be constructed with the following form (helping with readability):

params = ParamObjPikal((
    (Rp, hf0, csolid, ρsolution),
    (Kshf, Av, Ap),
    (pch, Tsh) ,
))

where those listed following are callables returning Quantitys, and the rest are Quantitys. See RpFormFit and RampedVariable for convenience types that can help with the callables.

  • Rp(x) with x a length returns mass transfer resistance (as a Unitful quantity)
  • Kshf(p) with p a pressure returns heat transfer coefficient (as a Unitful quantity).
  • Tsh(t), pch(t) return shelf temperature and chamber pressure respectively at time t.
source
LyoPronto.ParamObjPikalType
struct ParamObjPikal{__T_Rp, __T_hf0, __T_csolid, __T_ρsolution, __T_Kshf, __T_Av, __T_Ap, __T_pch, __T_Tsh} <: LyoPronto.ParamObj

The ParamObjPikal type is a container for the parameters used in the Pikal model.

source
LyoPronto.ParamObjRFType
struct ParamObjRF{__T_Rp, __T_hf0, __T_csolid, __T_ρsolution, __T_Kshf, __T_Av, __T_Ap, __T_pch, __T_Tsh, __T_P_per_vial, __T_mf0, __T_cpf, __T_mv, __T_cpv, __T_Arad, __T_f_RF, __T_eppf, __T_eppvw, __T_Kvwf, __T_Bf, __T_Bvw, __T_alpha} <: LyoPronto.ParamObj

The ParamObjRF type is a container for the parameters used in the RF model.

source
LyoPronto.calc_md_QMethod
calc_md_Q(u, po, t)

With the Pikal model, compute the mass flow at u=[hf, Tf], time t, and conditions po. Ideally po should be a ParamObjPikal.

This gets used inside the DAE solve, but for consistency is provided separately so to avoid the risk of making unit mistakes.

source
LyoPronto.end_condMethod
end_cond(u, t, integ)

Compute the end condition for primary drying (that mf or hf approaches zero).

source
LyoPronto.lumped_cap_rf!Function
lumped_cap_rf!(du, u, params, tn)
lumped_cap_rf!(du, u, params, tn, qret)

Compute the right-hand-side function for the ODEs making up the lumped-capacitance microwave-assisted model.

The optional argument qret defaults to Val(false); if set to Val(true), the function returns [Q_sub, Q_shf, Q_vwf, Q_RF_f, Q_RF_vw, Q_shw] with Q_... as Unitful quantities in watts. The extra results are helpful in investigating the significance of the various heat transfer modes, but are not necessary in the ODE integration.

du refers to [dmf/dt, dTf/dt, dTvw/dt], with u = [mf, Tf, Tvw]. u is taken without units but assumed to have the units of [g, K, K] (which is internally added). tn is assumed to be in hours (internally added), so dudt is returned with assumed units [g/hr, K/hr, K/hr] to be consistent.

It is recommended to use the ParamObjRF type to hold the parameters, since it allows some more convenient access to the parameters, but they can be given in the form of a tuple-of-tuples:

params = (   
    (Rp, hf0, cSolid, ρsolution),
    (Kshf_f, Av, Ap),
    (pch, Tsh, P_per_vial),
    (mf0, cpf, mv, cpv, Arad),
    (f_RF, eppf, eppvw),
    (Kvwf, Bf, Bvw, alpha),
)

This tuple-of-tuples structure is also used in an extra constructor for the ParamObjRF type.

These should all be Unitful quantities with appropriate dimensions, with some exceptions which are callables returning quantities. See RpFormFit and RampedVariable for convenience types that can help with these cases.

  • Rp(x) with x a length returns mass transfer resistance (as a Unitful quantity)

  • Kshf_f(p) with p a pressure returns heat transfer coefficient (as a Unitful quantity).

  • Tsh(t), pch(t), P_per_vial(t) return shelf temperature, chamber pressure, and microwave power respectively at time t.

  • Arad and alpha are used only in prior versions of the model, and can be left out.

This is my updated version of the model. LC3: Q_shw evaluated with Kshf; shape factor included; α=0

source

Physical Properties

LyoPronto.cp_glConstant

Glass heat capacity Rough estimate from Bansal and Doremus 1985, "Handbook of Glass Properties"

source
LyoPronto.k_glConstant

Glass thermal conductivity From Bansal and Doremus 1985, rough estimate based an a sodium borosilicate glass

source
LyoPronto.k_iceConstant

Thermal conductivity of ice From Slack, 1980 200K : .032 W/cmK 250K : .024 W/cmK 273K : .0214 W/cmK

source
LyoPronto.k_sucroseConstant

Thermal conductivity of sucrose, Caster grade powder From McCarthy and Fabre, 1989 book chapter

source
LyoPronto.ΔHsubConstant

Heat of sublimation of ice Approximate: coresponds to 254K or 225K From Feistel and Wagner, 2006

source
LyoPronto.μ_vapConstant

Water vapor viscosity in dilute limit

From Hellmann and Vogel, 2015 250K: 8.054 μPas 260K: 8.383 μPas 270K: 8.714 μPa*s

source
LyoPronto.calc_TsubMethod

Using the same Arrhenius fit as calc_psub, compute the sublimation temperature at a given pressure.

source
LyoPronto.calc_psubMethod
calc_psub(T) 
calc_psub(T::Q) where Q<:Quantity

Compute pressure (in Pascals) of sublimation at temperature T in Kelvin.

This is essentially an Arrhenius fit, where we compute: psub = pref * exp(-ΔHsub*Mw/R/T)

source
LyoPronto.DielectricModule

Single-purpose module for computing the dielectric loss coefficient of ice, as a function of temperature and frequency. This module exports a function ϵppf(T, f) for doing so. (Set as a separate module just to keep namespaces clean.) This code is a nearly-direct implementation of the correlation, Eqs. 3-6 presented in: Takeshi Matsuoka, Shuji Fujita, Shinji Mae; Effect of temperature on dielectric properties of ice in the range 5–39 GHz. J. Appl. Phys. 15 November 1996; 80 (10): 5884–5890. https://doi.org/10.1063/1.363582

source
LyoPronto.Dielectric.ϵppfMethod
ϵppf(T, f)

Compute the dielectric loss of ice as a function of temperature and frequency. Expects temperature in Kelvin and frequency in Hz, with Unitful units.

source

Equipment Capability

LyoPronto.ECCURT.eq_cap_lineMethod
eq_cap_line(d, vt, l, volume)

Compute the equipment capability line for given geometry parameters. The resulting object can be called with a pressure in mTorr to get the corresponding mass flow rate in kg/hr. The line's slope and intercept can be accessed with line.k and line.b, respectively.

If provided with Unitful.Quantity inputs, the geometry parameters will be converted to the expected units (mm for lengths, m^3 for volume) before calculation, and the result will have Unitful units as well. If provided with plain floats, plain floats will be returned.

The input values are:

  • d: Diameter of the duct [$mm$].
  • vt: Thickness of the butterfly valve inside the duct [$mm$]
  • l: Length of the duct [$mm$].
  • v: Volume of the product chamber [$m^3$].
source
LyoPronto.ECCURT.eq_cap_line_newMethod
eq_cap_line_new(d, vt, l, volume)

Compute the equipment capability line for given geometry parameters using interpolation on the pressures at the four mass flow rate sample points.

That line can be evaluated at pressure p, as a float in mTorr or with Unitful pressure to get the corresponding mass flow rate in kg/hr. To invert a resulting line, access its slope with line.k (in kg/hr/mTorr) and its intercept with line.b (in kg/hr).

If provided with Unitful.Quantity inputs, the geometry parameters will be converted to the expected units (mm for lengths, m^3 for volume) before calculation, and the result will have Unitful units as well. If provided with plain floats, plain floats will be returned.

The input values are:

  • d: Diameter of the duct [$mm$].
  • vt: Thickness of the butterfly valve inside the duct [$mm$]
  • l: Length of the duct [$mm$].
  • v: Volume of the product chamber [$m^3$].
source
LyoPronto.ECCURT.eq_cap_pressureMethod
eq_cap_pressure(m, D, valve_thickness, L, volume)

Call eq_cap_line to get the equipment capability line for the given geometry parameters, then evaluate that line with mass flow rate m in kg/hr to get minimum controllable pressure in mTorr.

If provided with Unitful.Quantity inputs, the geometry parameters will be converted to the expected units (mm for lengths, m^3 for volume) before calculation, and the result will have Unitful units as well. If provided with plain floats, plain floats will be returned.

The input values are:

  • d: Diameter of the duct [$mm$].
  • vt: Thickness of the butterfly valve inside the duct [$mm$]
  • l: Length of the duct [$mm$].
  • v: Volume of the product chamber [$m^3$].
source
LyoPronto.ECCURT.eq_cap_pressures_newMethod
eq_cap_pressures_new(d, vt, l, volume)

Compute the pressures at the four mass flow rate sample points for given geometry parameters. The resulting vector is in the same order as M_DOT, and has units of mTorr

If provided with Unitful.Quantity inputs, the geometry parameters will be converted to the expected units (mm for lengths, m^3 for volume) before calculation, and the result will have Unitful units as well. If provided with plain floats, plain floats will be returned.

The input values are:

  • d: Diameter of the duct [$mm$].
  • vt: Thickness of the butterfly valve inside the duct [$mm$]
  • l: Length of the duct [$mm$].
  • v: Volume of the product chamber [$m^3$].
source