diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index 8f1ebe37c8..2b04637b04 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -38,6 +38,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), + UName_("U"), + rhoName_("rho"), + psiName_("thermo:psi"), + muName_("thermo:mu"), accommodationCoeff_(1.0), Twall_(p.size(), 0.0), gamma_(1.4) @@ -57,6 +61,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ) : 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_) @@ -71,6 +79,10 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ) : mixedFvPatchScalarField(p, iF), + UName_(dict.lookupOrDefault("U", "U")), + rhoName_(dict.lookupOrDefault("rho", "rho")), + psiName_(dict.lookupOrDefault("psi", "thermo:psi")), + muName_(dict.lookupOrDefault("mu", "thermo:mu")), accommodationCoeff_(readScalar(dict.lookup("accommodationCoeff"))), Twall_("Twall", dict, p.size()), gamma_(dict.lookupOrDefault("gamma", 1.4)) @@ -159,13 +171,13 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs() } const fvPatchScalarField& pmu = - patch().lookupPatchField("mu"); + patch().lookupPatchField(muName_); const fvPatchScalarField& prho = - patch().lookupPatchField("rho"); + patch().lookupPatchField(rhoName_); const fvPatchField& ppsi = - patch().lookupPatchField("psi"); + patch().lookupPatchField(psiName_); const fvPatchVectorField& pU = - patch().lookupPatchField("U"); + patch().lookupPatchField(UName_); // Prandtl number reading consistent with rhoCentralFoam const dictionary& thermophysicalProperties = @@ -204,6 +216,12 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs() void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); + + writeEntryIfDifferent(os, "U", "U", UName_); + writeEntryIfDifferent(os, "rho", "rho", rhoName_); + writeEntryIfDifferent(os, "psi", "thermo:psi", psiName_); + writeEntryIfDifferent(os, "mu", "thermo:mu", muName_); + os.writeKeyword("accommodationCoeff") << accommodationCoeff_ << token::END_STATEMENT << nl; Twall_.writeEntry("Twall", os); diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H index 8f84cfb6e6..845aa9f424 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H @@ -53,13 +53,25 @@ class smoluchowskiJumpTFvPatchScalarField // Private data - // Accommodation coefficient + //- Velocity field name, default = "U" + word UName_; + + //- Density field name, default = "rho" + word rhoName_; + + //- Compressibility field name, default = "thermo:psi" + word psiName_; + + //- Dynamic viscosity field name, default = "thermo:mu" + word muName_; + + //- Accommodation coefficient scalar accommodationCoeff_; - // Wall surface temperature + //- Wall surface temperature scalarField Twall_; - // Heat capacity ratio (default 1.4) + //- Heat capacity ratio (default 1.4) scalar gamma_; public: