This source is designed to model the effect of solidification and melting processes, e.g. windshield defrosting. More...
Public Types | |
enum | thermoMode { thermo, lookup } |
Public Member Functions | |
TypeName ("solidificationMeltingSource") | |
Runtime type information. More... | |
solidificationMeltingSource (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | |
Construct from explicit source name and mesh. More... | |
solidificationMeltingSource (const solidificationMeltingSource &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual wordList | addSupFields () const |
Return the list of fields for which the fvModel adds source term. More... | |
virtual void | addSup (fvMatrix< scalar > &eqn, const word &fieldName) const |
Add explicit contribution to enthalpy equation. More... | |
virtual void | addSup (fvMatrix< vector > &eqn, const word &fieldName) const |
Add implicit contribution to momentum equation. More... | |
virtual void | addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const word &fieldName) const |
Add explicit contribution to compressible enthalpy equation. More... | |
virtual void | addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const word &fieldName) const |
Add implicit contribution to compressible momentum equation. More... | |
virtual bool | movePoints () |
Update for mesh motion. More... | |
virtual void | topoChange (const polyTopoChangeMap &) |
Update topology using the given map. More... | |
virtual void | mapMesh (const polyMeshMap &) |
Update from another mesh using the given map. More... | |
virtual void | distribute (const polyDistributionMap &) |
Redistribute or update using the given distribution map. More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
void | operator= (const solidificationMeltingSource &)=delete |
Disallow default bitwise assignment. More... | |
Public Member Functions inherited from fvModel | |
TypeName ("fvModel") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, fvModel, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh),(name, modelType, dict, mesh)) | |
fvModel (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | |
Construct from components. More... | |
autoPtr< fvModel > | clone () const |
Return clone. More... | |
virtual | ~fvModel () |
Destructor. More... | |
const word & | name () const |
Return const access to the source name. More... | |
const fvMesh & | mesh () const |
Return const access to the mesh database. More... | |
const dictionary & | coeffs () const |
Return dictionary. More... | |
virtual bool | addsSupToField (const word &fieldName) const |
Return true if the fvModel adds a source term to the given. More... | |
virtual scalar | maxDeltaT () const |
Return the maximum time-step for stable operation. More... | |
FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_SUP) | |
Add a source term to an equation. More... | |
FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_RHO_SUP) | |
Add a source term to a compressible equation. More... | |
FOR_ALL_FIELD_TYPES (DEFINE_FV_MODEL_ADD_ALPHA_RHO_SUP) | |
Add a source term to a phase equation. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field) const |
Return source for an equation. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
Return source for an equation with a specified name. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const |
Return source for a compressible equation. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
Return source for a compressible equation with a specified name. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const |
Return source for a phase equation. More... | |
template<class Type > | |
tmp< fvMatrix< Type > > | source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
Return source for a phase equation with a specified name. More... | |
virtual void | preUpdateMesh () |
Prepare for mesh update. More... | |
virtual void | correct () |
Correct the fvModel. More... | |
template<class Type , class AlphaRhoFieldType , class ... AlphaRhoFieldTypes> | |
Foam::dimensionSet | sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds, const AlphaRhoFieldType &alphaRho, const AlphaRhoFieldTypes &... alphaRhos) |
template<class Type > | |
Foam::dimensionSet | sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds) |
template<class Type , class ... AlphaRhoFieldTypes> | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds, const AlphaRhoFieldTypes &... alphaRhos) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field) const |
template<class Type > | |
Foam::tmp< Foam::fvMatrix< Type > > | source (const volScalarField &alpha, const volScalarField &rho, const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName) const |
Static Public Attributes | |
static const NamedEnum< thermoMode, 2 > | thermoModeTypeNames_ |
Additional Inherited Members | |
Static Public Member Functions inherited from fvModel | |
template<class Type , class AlphaRhoFieldType , class ... AlphaRhoFieldTypes> | |
static dimensionSet | sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds, const AlphaRhoFieldType &alphaRho, const AlphaRhoFieldTypes &... alphaRhos) |
Return the dimensions of the matrix of a source term. More... | |
template<class Type > | |
static dimensionSet | sourceDims (const GeometricField< Type, fvPatchField, volMesh > &field, const dimensionSet &ds) |
Return the dimensions of the matrix of a source term (base. More... | |
static autoPtr< fvModel > | New (const word &name, const dictionary &dict, const fvMesh &mesh) |
Return a reference to the selected fvModel. More... | |
Protected Member Functions inherited from fvModel | |
template<class Type > | |
void | addSupType (fvMatrix< Type > &eqn, const word &fieldName) const |
Add a source term to an equation. More... | |
template<class Type > | |
void | addSupType (const volScalarField &rho, fvMatrix< Type > &eqn, const word &fieldName) const |
Add a source term to a compressible equation. More... | |
template<class Type > | |
void | addSupType (const volScalarField &alpha, const volScalarField &rho, fvMatrix< Type > &eqn, const word &fieldName) const |
Add a source term to a phase equation. More... | |
template<class Type , class ... AlphaRhoFieldTypes> | |
tmp< fvMatrix< Type > > | source (const GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds, const AlphaRhoFieldTypes &... alphaRhos) const |
Return source for equation with specified name and dimensions. More... | |
This source is designed to model the effect of solidification and melting processes, e.g. windshield defrosting.
The isotherm phase change occurs at the melting temperature, Tsol
(= Tliq
). The not isotherm phase change occurs between solidus and liquidus temperature, Tsol
< Tliq
respectively, as long as the melt fraction is greater than the max eutectic melt fraction, alpha1e
(0 = pure_substance, 1 = eutectic_mixture is not permitted), where a linear eutectic melt fraction to temperature relation is considered; e.g. given a specific quantity of a binary system, alpha1
is its melt fraction and alpha0
is its solid fraction, such that alpha0
= 1 - alpha1
therefore, assuming infinite solute diffusion, the quantity of a component in solid phase is (1 - alpha1
) * CS
where CS
is the solid concentration of the considered component and the quantity of a component in liquid phase is alpha1
* CL
where CL
is the melt concentration of the considered component; considering that the total quantity of a component must be equal to the sum of the quantities of the considered component in the liquid and solid phases, if C0
is the initial concentration of the considered component before the phase change, then: C0
= (1 - alpha1
) * CS
+ alpha1
* CL
(lever rule) from which: alpha1
= (C0
- CS
) / (CL
- CS
) and thus:
alpha1e
= 0;alpha1e
= C0
/ CLE
where CLE
is eutectic melt concentration;alpha1e
= (C0
- CSE
) / (CLE
- CSE
) where CSE
is eutectic solid concentration of the relative solid solution.The presence of the solid phase in the flow field is incorporated into the model as a momentum porosity contribution; the energy associated with the phase change is added as an enthalpy contribution.
References:
Voller, V. R., & Prakash, C. (1987). A fixed grid numerical modelling methodology for convection-diffusion mushy region phase-change problems. International Journal of Heat and Mass Transfer, 30(8), 1709-1719. Swaminathan, C. R., & Voller, V. R. (1992). A general enthalpy method for modeling solidification processes. Metallurgical transactions B, 23(5), 651-664.
The model generates the field <name>
:alpha1 which can be visualised to to show the melt distribution as a fraction [0-1].
solidificationMeltingSource1 { type solidificationMeltingSource; selectionMode cellZone; cellZone iceZone; Tsol 273; L 334000; thermoMode thermo; beta 50e-6; rhoRef 800; }
Where:
Property | Description | Required | Default value | |
---|---|---|---|---|
Tsol | Solidus temperature [K] | yes | ||
Tliq | Liquidus temperature [K] | no | Tsol | |
alpha1e | Max eutectic melt fraction [0-1[ | no | 0 | |
L | Latent heat of fusion [J/kg] | yes | ||
relax | Relaxation coefficient [0-1] | no | 0.9 | |
thermoMode | Thermo mode [thermo | lookup] | yes | |
rhoRef | Reference (solid) density [kg/m^3] | yes | ||
rho | Name of density field | no | rho | |
T | Name of temperature field | no | T | |
Cp | Name of specific heat field | no | Cp | |
U | Name of velocity field | no | U | |
phi | Name of flux field | no | phi | |
Cu | Model coefficient [1/s] | no | 100000 | |
q | Model coefficient | no | 0.001 | |
beta | Thermal expansion coefficient [1/K] | yes | ||
g | Accelerartion due to gravity | no |
Definition at line 225 of file solidificationMeltingSource.H.
|
strong |
Enumerator | |
---|---|
thermo | |
lookup |
Definition at line 231 of file solidificationMeltingSource.H.
solidificationMeltingSource | ( | const word & | name, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvMesh & | mesh | ||
) |
Construct from explicit source name and mesh.
Definition at line 220 of file solidificationMeltingSource.C.
Referenced by NamedEnum< compressibleField, 8 >::names().
|
delete |
Disallow default bitwise copy construction.
TypeName | ( | "solidificationMeltingSource" | ) |
Runtime type information.
|
virtual |
Return the list of fields for which the fvModel adds source term.
to the transport equation
Reimplemented from fvModel.
Definition at line 266 of file solidificationMeltingSource.C.
References solidificationMeltingSource::addSup(), basicThermo::he(), lookup(), mesh, IOobject::name(), List< T >::null(), and thermo.
Add explicit contribution to enthalpy equation.
Definition at line 288 of file solidificationMeltingSource.C.
Referenced by solidificationMeltingSource::addSup(), and solidificationMeltingSource::addSupFields().
Add implicit contribution to momentum equation.
Definition at line 309 of file solidificationMeltingSource.C.
References solidificationMeltingSource::addSup(), cells, Cp(), lduMatrix::diag(), Foam::endl(), forAll, g, Foam::Info, mesh, IOobject::name(), Foam::pow3(), fvMatrix< Type >::psi(), Foam::fvm::S(), fvMatrix< Type >::source(), Sp, Foam::sqr(), Su, and Foam::type().
|
virtual |
Add explicit contribution to compressible enthalpy equation.
Definition at line 298 of file solidificationMeltingSource.C.
References solidificationMeltingSource::addSup().
|
virtual |
Add implicit contribution to compressible momentum equation.
Definition at line 348 of file solidificationMeltingSource.C.
|
virtual |
Update for mesh motion.
Implements fvModel.
Definition at line 359 of file solidificationMeltingSource.C.
References solidificationMeltingSource::topoChange().
|
virtual |
Update topology using the given map.
Implements fvModel.
Definition at line 367 of file solidificationMeltingSource.C.
Referenced by solidificationMeltingSource::movePoints().
|
virtual |
Update from another mesh using the given map.
Implements fvModel.
Definition at line 375 of file solidificationMeltingSource.C.
References solidificationMeltingSource::distribute().
|
virtual |
Redistribute or update using the given distribution map.
Implements fvModel.
Definition at line 382 of file solidificationMeltingSource.C.
Referenced by solidificationMeltingSource::mapMesh().
|
virtual |
Read source dictionary.
Reimplemented from fvModel.
Definition at line 390 of file solidificationMeltingSource.C.
References fvModel::read().
|
delete |
Disallow default bitwise assignment.
|
static |
Definition at line 237 of file solidificationMeltingSource.H.
Referenced by NamedEnum< compressibleField, 8 >::names().