Fit the binary interaction parameters of a mixtures.
Fitting setup for quadratic combining rules, it is possible to select
which parameters will be optimized with the fit_lij
and fit_kij
attributes.
type(CubicEoS) :: model ! Model to fit
type(FitKijLij) :: fitting_problem ! Fitting problem specification
type(EquilibriumState) :: exp_data(3)
real(pr) :: X(2) ! parameter variables
real(pr) :: error
! <some procedure to define exp data>
model = PengRobinson76(tc, pc, w) ! Model to fit
fitting_problem%exp_data = exp_data
fitting_problem%model = model
fitting_problem%fit_kij = .true.
X = 0 ! initial values == 0
err = optimize(X, fitting_problem)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(EquilibriumState), | public, | allocatable | :: | experimental_points(:) |
Experimental points to fit |
||
logical, | public | :: | fit_kij | = | .false. |
Fit the parameter |
|
logical, | public | :: | fit_kij_exp_t | = | .false. |
Fit |
|
logical, | public | :: | fit_lij | = | .false. |
Fit the parameter |
|
class(ArModel), | public, | allocatable | :: | model |
Residual Helmholtz Model to fit |
||
logical, | public | :: | verbose | = | .false. |
If true log the fitting process |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(FitKijLij), | intent(inout) | :: | problem | |||
real(kind=pr), | intent(in) | :: | X(:) |