rhoCentralFoam: Updated BCs to support mesh refinement and unrefinement

This commit is contained in:
Henry Weller
2020-03-11 23:23:29 +00:00
parent 220507b4f5
commit 262a3366f9
6 changed files with 96 additions and 68 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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,25 +53,6 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
}
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const smoluchowskiJumpTFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
UName_(ptf.UName_),
rhoName_(ptf.rhoName_),
psiName_(ptf.psiName_),
muName_(ptf.muName_),
accommodationCoeff_(ptf.accommodationCoeff_),
Twall_(ptf.Twall_),
gamma_(ptf.gamma_)
{}
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const fvPatch& p,
@ -120,6 +101,25 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
}
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const smoluchowskiJumpTFvPatchScalarField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mixedFvPatchScalarField(ptf, p, iF, mapper),
UName_(ptf.UName_),
rhoName_(ptf.rhoName_),
psiName_(ptf.psiName_),
muName_(ptf.muName_),
accommodationCoeff_(ptf.accommodationCoeff_),
Twall_(mapper(ptf.Twall_)),
gamma_(ptf.gamma_)
{}
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const smoluchowskiJumpTFvPatchScalarField& ptpsf,
@ -135,17 +135,16 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Map from self
void Foam::smoluchowskiJumpTFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFvPatchScalarField::autoMap(m);
m(Twall_, Twall_);
}
// Reverse-map the given fvPatchField onto this fvPatchField
void Foam::smoluchowskiJumpTFvPatchScalarField::rmap
(
const fvPatchField<scalar>& ptf,
@ -153,10 +152,14 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::rmap
)
{
mixedFvPatchField<scalar>::rmap(ptf, addr);
const smoluchowskiJumpTFvPatchScalarField& ptpsf =
refCast<const smoluchowskiJumpTFvPatchScalarField>(ptf);
Twall_.rmap(ptpsf.Twall_, addr);
}
// Update the coefficients associated with the patch field
void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
{
if (updated())

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -135,6 +135,9 @@ public:
);
}
// Member Functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,27 +51,6 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
{}
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
(
const maxwellSlipUFvPatchVectorField& mspvf,
const fvPatch& p,
const DimensionedField<vector, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
TName_(mspvf.TName_),
rhoName_(mspvf.rhoName_),
psiName_(mspvf.psiName_),
muName_(mspvf.muName_),
tauMCName_(mspvf.tauMCName_),
accommodationCoeff_(mspvf.accommodationCoeff_),
Uwall_(mspvf.Uwall_),
thermalCreep_(mspvf.thermalCreep_),
curvature_(mspvf.curvature_)
{}
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
(
const fvPatch& p,
@ -126,6 +105,27 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
}
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
(
const maxwellSlipUFvPatchVectorField& mspvf,
const fvPatch& p,
const DimensionedField<vector, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
mixedFixedValueSlipFvPatchVectorField(mspvf, p, iF, mapper),
TName_(mspvf.TName_),
rhoName_(mspvf.rhoName_),
psiName_(mspvf.psiName_),
muName_(mspvf.muName_),
tauMCName_(mspvf.tauMCName_),
accommodationCoeff_(mspvf.accommodationCoeff_),
Uwall_(mapper(mspvf.Uwall_)),
thermalCreep_(mspvf.thermalCreep_),
curvature_(mspvf.curvature_)
{}
Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
(
const maxwellSlipUFvPatchVectorField& mspvf,
@ -147,6 +147,31 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::maxwellSlipUFvPatchVectorField::autoMap
(
const fvPatchFieldMapper& m
)
{
mixedFixedValueSlipFvPatchVectorField::autoMap(m);
m(Uwall_, Uwall_);
}
void Foam::maxwellSlipUFvPatchVectorField::rmap
(
const fvPatchVectorField& pvf,
const labelList& addr
)
{
mixedFixedValueSlipFvPatchVectorField::rmap(pvf, addr);
const maxwellSlipUFvPatchVectorField& mspvf =
refCast<const maxwellSlipUFvPatchVectorField>(pvf);
Uwall_.rmap(mspvf.Uwall_, addr);
}
void Foam::maxwellSlipUFvPatchVectorField::updateCoeffs()
{
if (updated())

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -146,8 +146,22 @@ public:
// Member Functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
// Used to update fields following mesh topology change
virtual void autoMap(const fvPatchFieldMapper&);
//- Reverse map the given fvPatchField onto this fvPatchField
// Used to reconstruct fields
virtual void rmap(const fvPatchVectorField&, const labelList&);
// Evaluation functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,17 +69,6 @@ Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
{}
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
(
const fixedRhoFvPatchScalarField& frpsf
)
:
fixedValueFvPatchScalarField(frpsf),
pName_(frpsf.pName_),
psiName_(frpsf.psiName_)
{}
Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
(
const fixedRhoFvPatchScalarField& frpsf,

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-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -121,12 +121,6 @@ public:
const fvPatchFieldMapper&
);
//- Copy constructor
fixedRhoFvPatchScalarField
(
const fixedRhoFvPatchScalarField&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{