Dear Mona,
yes this is exactly how you would do it. The model deduces the number of
components from the fluid system. It’s actually not too difficult to add more
components to liquid2c, so you can use that as a base. Set numComponents to 3
(or more). Add a third (fourth…) component whereever you see “second component”
by copy
All interfaces receiving a compIdx (component index) now need to handle the
case when compIdx==2 (or more) as well. For example, you need to make a
decision of your components influence the density of the mixture. If not you
can just return a constant or for instance the pure water density from the
“density” function. These decisions vary from model to model which is also the
reason why there is no default implementation.
If you are using Component::Constant as components, all components should get
different IDs (the first template argument). Then you can set different
properties via the input file, e.g.
[1.Component]
LiquidDiffusionCoefficient = 3e-9
[2.Component]
LiquidDiffusionCoefficient = 1e-10
Let us know if you get stuck. Good luck!
Best wishes
Timo
> On 19 Jun 2023, at 22:09, Giraud, Mona wrote:
>
>
> Dear Dumux community,
>
> I wish to use the richardsnc model for more than two components ( the main
> component [water] + n other components).
>
> However, the file "dumux\porousmediumflow\richardsnc\model.hh" uses the file
> "dumux/material/fluidsystems/liquidphase2c.hh" and we have moreover:
>
> '''
>
> /*!
> *\brief The fluid system used by the model.
> *
> * By default this uses the liquid phase fluid system with simple H2O.
> */
> template
> struct FluidSystem
> {
> using Scalar = GetPropType;
> using type = FluidSystems::LiquidPhaseTwoC Components::SimpleH2O, Components::Constant<1, Scalar>>;
> };
> '''
> Does it then mean that the file "richardsnc\model.hh"" needs to be adapted
> and a new file "dumux/material/fluidsystems/liquidphase3c.hh" (for 3
> components) needs to be created before the richards model may be used for
> more than two components? And if that is the case, are there any other base
> files which would have to be changed/added before the richardsnc model may be
> used for a problem with more than 2 components?
> Many thanks for your help!
> Mona
>
>
>
>
>
>
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
> Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
> Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens,
> Prof. Dr. Astrid Lambrecht, Prof. Dr. Frauke Melchior
>
>
> ___
> DuMux mailing list
> DuMux@listserv.uni-stuttgart.de
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
___
DuMux mailing list
DuMux@listserv.uni-stuttgart.de
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux