timeVaryingMappedFixedValueFvPatchField: Refactored so the underlying mapping function can be used in other BCs

The new patch field mapping class timeVaryingMappedFvPatchField has been
factored out of the timeVaryingMappedFixedValueFvPatchField BC so that it can be
used to map data onto fields stored within other BCs.

In the process the writeEntryIfDifferent function had to be moved from
fvPatchField to dictionary so that it can still be used in the
timeVaryingMappedFvPatchField class and it made good sense to create the
non-conditional variant writeEntry to simplify the patch field write functions.
This rationalisation has been propagated all other patch fields.
This commit is contained in:
Henry Weller
2019-01-29 10:09:38 +00:00
parent 08553fbc9d
commit 8b4f866b51
113 changed files with 1282 additions and 1066 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -214,11 +214,9 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
os.writeKeyword("accommodationCoeff")
<< accommodationCoeff_ << token::END_STATEMENT << nl;
Foam::writeEntry(os, "accommodationCoeff", accommodationCoeff_);
Twall_.writeEntry("Twall", os);
os.writeKeyword("gamma")
<< gamma_ << token::END_STATEMENT << nl;
Foam::writeEntry(os, "gamma", gamma_);
writeEntry("value", os);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -206,12 +206,10 @@ void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
writeEntryIfDifferent<word>(os, "tauMC", "tauMC", tauMCName_);
os.writeKeyword("accommodationCoeff")
<< accommodationCoeff_ << token::END_STATEMENT << nl;
Foam::writeEntry(os, "accommodationCoeff", accommodationCoeff_);
Uwall_.writeEntry("Uwall", os);
os.writeKeyword("thermalCreep")
<< thermalCreep_ << token::END_STATEMENT << nl;
os.writeKeyword("curvature") << curvature_ << token::END_STATEMENT << nl;
Foam::writeEntry(os, "thermalCreep", thermalCreep_);
Foam::writeEntry(os, "curvature", curvature_);
refValue().writeEntry("refValue", os);
valueFraction().writeEntry("valueFraction", os);