Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let users define fallback eos_constrain_step #58

Open
stepanzh opened this issue Oct 14, 2022 · 0 comments
Open

Let users define fallback eos_constrain_step #58

stepanzh opened this issue Oct 14, 2022 · 0 comments

Comments

@stepanzh
Copy link
Collaborator

Currently, eos_constrain_step fallbacks to unconstrained condition.

function vt_split(
mix::AbstractEoSMixture{T},
nmol::AbstractVector,
volume::Real,
RT::Real,
concentration::AbstractVector,
StateVariables::Type{<:AbstractVTSplitState};
tol::Real=1024*eps(T),
chemtol::Real=tol,
presstol::Real=tol,
maxiter::Integer=100,
eos_constrain_step::Function=unconstrained_eos_step,
) where {T}

I guess, it's better to let users define default constrain step function.

It may be defined as eos_constrain_step_factory(::Eos, ::Variables) -> eos_constrain_step(::Vars, x, d) or similar.

In CubicEoS interface, we define the factory producing unconstrain step, this is CubicEoS's default. But, user can define it's own default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant