The new fvModels is a general interface to optional physical models in the finite volume framework, providing sources to the governing conservation equations, thus ensuring consistency and conservation. This structure is used not only for simple sources and forces but also provides a general run-time selection interface for more complex models such as radiation and film, in the future this will be extended to Lagrangian, reaction, combustion etc. For such complex models the 'correct()' function is provided to update the state of these models at the beginning of the PIMPLE loop. fvModels are specified in the optional constant/fvModels dictionary and backward-compatibility with fvOption is provided by reading the constant/fvOptions or system/fvOptions dictionary if present. The new fvConstraints is a general interface to optional numerical constraints applied to the matrices of the governing equations after construction and/or to the resulting field after solution. This system allows arbitrary changes to either the matrix or solution to ensure numerical or other constraints and hence violates consistency with the governing equations and conservation but it often useful to ensure numerical stability, particularly during the initial start-up period of a run. Complex manipulations can be achieved with fvConstraints, for example 'meanVelocityForce' used to maintain a specified mean velocity in a cyclic channel by manipulating the momentum matrix and the velocity solution. fvConstraints are specified in the optional system/fvConstraints dictionary and backward-compatibility with fvOption is provided by reading the constant/fvOptions or system/fvOptions dictionary if present. The separation of fvOptions into fvModels and fvConstraints provides a rational and consistent separation between physical and numerical models which is easier to understand and reason about, avoids the confusing issue of location of the controlling dictionary file, improves maintainability and easier to extend to handle current and future requirements for optional complex physical models and numerical constraints.
Reference:
Figueiredo, R. A., Oishi, C. M., Afonso, A. M., Tasso, I. V. M., &
Cuminato, J. A. (2016).
A two-phase solver for complex fluids: Studies of the Weissenberg effect.
International Journal of Multiphase Flow, 84, 98-115.
In compressibleInterFoam with momentumTransport simulationType set to
twoPhaseTransport separate stress models (laminar, non-Newtonian, LES or RAS)
are instantiated for each of the two phases allowing for different modeling for
the phases.
This example case uses:
- phases "air" and "liquid"
- air phase
- constant/momentumTransport.air:
- stress model set to laminar, Newtonian
- constant/thermophysicalProperties.air:
- transport set to const (Newtonian)
- mu (dynamic viscoity) = 1.84e-5
- liquid phase
- constant/momentumTransport.liquid:
- stress model set to laminar, Maxwell non-Newtonian
- nuM (kinematic viscosity) = 0.01476
- lambda = 0.018225
- constant/thermophysicalProperties.liquid
- transport set to const (Newtonian)
- mu (dynamic viscoity) = 1.46
Liquid phase properties were calculated from the relations given in the paper:
- rho = 890 kg/m^3
- mu = mu_{s} + mu_{p} = 146 poise = 14.6 Pa.s
s = solvent (Newtonian), p = polymer (Maxwell)
- mu_{s}/mu_{p} = 1/9
=> mu_{s} = 14.6/10 = 1.46 Pa.s
=> nu_{p} = nuM = (9/10)*14.6/890 = 0.01476 m^2/s
compressibleInterFoam solves the energy equation, despite not being needed in
this example. The case is simply initialised at a uniform temperature of 300K
throughout the domain and at the atmosphere boundary.