diff --git a/slides/materialsystem.md b/slides/materialsystem.md index 237078d8120758734a426e8902089306a8b227d4..8483d465b6e32ebd2b9f45ef967c9a02b9c90e31 100644 --- a/slides/materialsystem.md +++ b/slides/materialsystem.md @@ -1,19 +1,15 @@ --- title: Material system -author: Tufan Ghosh --- # Introduction to DuMuX- Material system -# Material system - ## Challenges in simulating porous media: * Highly heterogeneous distribution of parameters and complex nonlinear material laws * Strong interconnection of properties **--->** difficult to achieve modularity - ## Modular structure: <ins> User-defined parameters and relationships: </ins> @@ -203,67 +199,58 @@ CompositionFromFugacities: takes all component fugacities, the temperature and p <img src="img/component-fluidsystem.png" width="500"/> -## Example: 2 phases, immiscible +## Example: 2 phases, miscible * Components: _H2O_, _Air_ - * Fluid system: _TwoPImmiscible_ + * Fluid system: _TwoPTwoC_ ## Include headers in properties file: components ```cpp -// The numerical model -#include <dumux/porousmediumflow/2p/implicit/model.hh> +// The two-phase immiscible fluid system +#include <dumux/material/fluidsystems/h2oair.hh> // The water component #include <dumux/material/components/h2o.hh> // The air component #include <dumux/material/components/air.hh> ``` -## Include headers in properties file: phases - -```cpp -// The two-phase immiscible fluid system -#include <dumux/material/fluidsystems/2pimmiscible.hh> -// Liquid phase -#include <dumux/material/fluidsystems/1pliquid.hh> -// Gas phase -#include <dumux/material/fluidsystems/1pgas.hh> -// Solid phase -#include <dumux/material/solidsystems/1csolid.hh> -``` - ## Specify fluid system in properties file: ```cpp -// we use the immiscible fluid system here -SET_PROP(WaterAirProblem, FluidSystem) + +template<class TypeTag> +struct FluidSystem<TypeTag, TTag::H2OAir> { private: -using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -using LiquidPhase = typename FluidSystems::LiquidPhase<Scalar, - H2O<Scalar> >; -using GasPhase = typename FluidSystems::GasPhase<Scalar, - Air<Scalar> >; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; public: -using type = typename FluidSystems::TwoPImmiscible<Scalar, - LiquidPhase, GasPhase>; + using type = FluidSystems::H2OAir<Scalar, + Components::TabulatedComponent<Components::H2O<Scalar>>, + FluidSystems::H2OAirDefaultPolicy</*fastButSimplifiedRelations=*/true>, + true /*useKelvinEquation*/>; }; ``` # Example: From component to solid system +## Example: 2 phases, miscible + + * Components: _CaO_, _CaO2H2_ (slaked lime) + * Solid system: _OnePNCMin_ + ## Specify solid system in properties file: ```cpp -// we use the inert solid system here -SET_PROP(WaterAirProblem, SolidSystem) +// The solid system +template<class TypeTag> +struct SolidSystem<TypeTag, TTag::ThermoChem> { -private: -using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); -using ComponentT = Components::Granite<Scalar>; -public: -using type = SolidSystems::InertSolidphase<Scalar, ComponentT>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using ComponentOne = Components::ModifiedCaO<Scalar>; + using ComponentTwo = Components::CaO2H2<Scalar>; + using type = SolidSystems::CompositionalSolidPhase<Scalar, ComponentOne, ComponentTwo>; }; ``` ## Note to solid system