FS#100 Specify initial and boundary conditions independently of the physical model
Metadata
Property |
Value |
Project |
dumux |
Category |
General |
Reported by |
Anonymous (Id=0) |
Reported at |
Aug 17, 2010 08:46 |
Type |
Feature Request |
Version |
Git |
Last edited by |
Andreas Lauser (andreas.lauser@iws.uni-stuttgart.de) |
Last edited at |
Mar 6, 2012 17:14 |
Closed by |
Andreas Lauser (andreas.lauser@iws.uni-stuttgart.de) |
Closed at |
Mar 6, 2012 17:14 |
Closed in version |
unknown (Id=0) |
Resolution |
Implemented |
Description
currently the initial and dirichlet conditions are specified by directly defining the primary variables of the model used by the problem. It would be desireable to be able to specify them in a model-agnostic way. For this, the PrimaryVariables class could retrieve its values from a fluid state. In pseudo-code this looks like
void dirichlet(PrimaryVariables &priVars)
{
TwoPhaseFluidState fs(pW, Sn);
priVars.assign(fs, PrimaryVariables::MassConservative);
};
a similar approach could be taken for neumann boundaries which would allow to specify fluxes in arbitrary ways:
void neumann(Fluxes &flux, const FluidState &fs)
{
Scalar fluxWetting = 0.1; // m^3/(s*m^2)
Scalar fluxNonwetting = 0.01; // m^3/(s*m^2)
TwoPhaseVolumeFluxes volFlux(fs, fluxWetting, fluxNonwetting);
flux.assign(volFlux, Fluxes::MassConservative);
};