BUGFIX: Fixed errors in MRF, switched to rothalpy equation. Author: Hrvoje Jasak. Merge: Dominik Christ.
This commit is contained in:
commit
80b603ad1a
73 changed files with 978 additions and 7712 deletions
|
@ -2,17 +2,21 @@
|
|||
// Solve the enthalpy equation
|
||||
T.storePrevIter();
|
||||
|
||||
surfaceScalarField faceU = phi/fvc::interpolate(rho);
|
||||
// Calculate face velocity from flux
|
||||
surfaceScalarField faceU
|
||||
(
|
||||
"faceU",
|
||||
phi/fvc::interpolate(rho)
|
||||
);
|
||||
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
fvm::ddt(rho, h)
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
+ fvm::SuSp((fvc::div(faceU, p, "div(U,p)") - p*fvc::div(faceU))/h, h)
|
||||
==
|
||||
// ddt(p) term removed: steady-state. HJ, 27/Apr/2010
|
||||
fvc::div(faceU, p, "div(U,p)")
|
||||
- p*fvc::div(faceU)
|
||||
// Viscous heating: note sign (devRhoReff has a minus in it)
|
||||
- (turbulence->devRhoReff() && fvc::grad(U))
|
||||
);
|
||||
|
|
|
@ -53,7 +53,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
|
|
@ -9,11 +9,25 @@
|
|||
// Create rotational velocity (= omega x r)
|
||||
Urot = U - Urel;
|
||||
|
||||
// Calculate face velocity from absolute flux
|
||||
surfaceScalarField rhof = fvc::interpolate(rho);
|
||||
|
||||
surfaceScalarField phiAbs
|
||||
(
|
||||
"phiAbs",
|
||||
phi
|
||||
);
|
||||
mrfZones.absoluteFlux(rhof, phiAbs);
|
||||
|
||||
surfaceScalarField faceU("faceU", phiAbs/rhof);
|
||||
|
||||
fvScalarMatrix iEqn
|
||||
(
|
||||
fvm::ddt(rho, i)
|
||||
+ fvm::div(phi, i)
|
||||
- fvm::laplacian(turbulence->alphaEff(), i)
|
||||
// u & gradP term (steady-state formulation)
|
||||
+ fvm::SuSp((fvc::div(faceU, p, "div(U,p)") - fvc::div(faceU)*p)/i, i)
|
||||
==
|
||||
// Viscous heating: note sign (devRhoReff has a minus in it)
|
||||
- (turbulence->devRhoReff() && fvc::grad(Urel))
|
||||
|
|
|
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
|
|
@ -85,3 +85,18 @@
|
|||
),
|
||||
Urel + SRF->U()
|
||||
);
|
||||
|
||||
// Create rothalpy, in two steps to preserve boundary conditions
|
||||
volScalarField i
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"i",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
h
|
||||
);
|
||||
i -= 0.5*magSqr(SRF->U());
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
// Solve the enthalpy equation
|
||||
T.storePrevIter();
|
||||
|
||||
surfaceScalarField faceU = phi/fvc::interpolate(rho);
|
||||
|
||||
fvScalarMatrix hEqn
|
||||
(
|
||||
fvm::ddt(rho, h)
|
||||
+ fvm::div(phi, h)
|
||||
- fvm::laplacian(turbulence->alphaEff(), h)
|
||||
==
|
||||
// ddt(p) term removed: steady-state. HJ, 27/Apr/2010
|
||||
fvc::div(faceU, p, "div(U,p)")
|
||||
- p*fvc::div(faceU)
|
||||
// Viscous heating: note sign (devRhoReff has a minus in it)
|
||||
- (turbulence->devRhoReff() && fvc::grad(Urel))
|
||||
);
|
||||
|
||||
hEqn.relax();
|
||||
|
||||
eqnResidual = hEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
|
||||
// Bound the enthalpy using TMin and TMax
|
||||
volScalarField Cp = thermo.Cp();
|
||||
|
||||
h = Foam::min(h, TMax*Cp);
|
||||
h = Foam::max(h, TMin*Cp);
|
||||
h.correctBoundaryConditions();
|
||||
|
||||
thermo.correct();
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
// Solve the enthalpy equation
|
||||
T.storePrevIter();
|
||||
|
||||
// Calculate face velocity from flux
|
||||
surfaceScalarField faceU
|
||||
(
|
||||
"faceU",
|
||||
phi/fvc::interpolate(rho) + (SRF->faceU() & mesh.Sf())
|
||||
);
|
||||
|
||||
fvScalarMatrix iEqn
|
||||
(
|
||||
fvm::ddt(rho, i)
|
||||
+ fvm::div(phi, i)
|
||||
- fvm::laplacian(turbulence->alphaEff(), i)
|
||||
// u & gradP term (steady-state formulation)
|
||||
+ fvm::SuSp((fvc::div(faceU, p, "div(U,p)") - p*fvc::div(faceU))/i, i)
|
||||
==
|
||||
// ddt(p) term removed: steady-state. HJ, 27/Apr/2010
|
||||
// Viscous heating: note sign (devRhoReff has a minus in it)
|
||||
- (turbulence->devRhoReff() && fvc::grad(Urel))
|
||||
);
|
||||
|
||||
iEqn.relax();
|
||||
|
||||
eqnResidual = iEqn.solve().initialResidual();
|
||||
maxResidual = max(eqnResidual, maxResidual);
|
||||
|
||||
// Calculate enthalpy out of rothalpy
|
||||
volVectorField Urot("Urot", SRF->U());
|
||||
|
||||
h = i + 0.5*magSqr(Urot);
|
||||
h.correctBoundaryConditions();
|
||||
|
||||
// Bound the enthalpy using TMin and TMax
|
||||
volScalarField Cp = thermo.Cp();
|
||||
|
||||
h = Foam::min(h, TMax*Cp);
|
||||
h = Foam::max(h, TMin*Cp);
|
||||
h.correctBoundaryConditions();
|
||||
|
||||
// Re-initialise rothalpy based on limited enthalpy
|
||||
i = h - 0.5*magSqr(Urot);
|
||||
|
||||
thermo.correct();
|
||||
}
|
|
@ -55,7 +55,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
for (runTime++; !runTime.end(); runTime++)
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
|
@ -65,10 +65,9 @@ int main(int argc, char *argv[])
|
|||
# include "initConvergenceCheck.H"
|
||||
|
||||
# include "UEqn.H"
|
||||
# include "iEqn.H"
|
||||
# include "pEqn.H"
|
||||
|
||||
# include "hEqn.H"
|
||||
|
||||
# include "rhoFromP.H"
|
||||
|
||||
// Correct turbulence
|
||||
|
|
|
@ -208,6 +208,26 @@ Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::U() const
|
|||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::surfaceVectorField> Foam::SRF::SRFModel::faceU() const
|
||||
{
|
||||
return tmp<surfaceVectorField>
|
||||
(
|
||||
new surfaceVectorField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"faceUsrf",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
omega_ ^ (mesh_.Cf() - axis_*(axis_ & mesh_.Cf()))
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::volVectorField> Foam::SRF::SRFModel::Uabs() const
|
||||
{
|
||||
const volVectorField Usrf = U();
|
||||
|
|
|
@ -171,6 +171,9 @@ public:
|
|||
//- Return velocity of SRF for complete mesh
|
||||
tmp<volVectorField> U() const;
|
||||
|
||||
//- Return face velocity of SRF for complete mesh
|
||||
tmp<surfaceVectorField> faceU() const;
|
||||
|
||||
//- Return absolute velocity for complete mesh
|
||||
tmp<volVectorField> Uabs() const;
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@ derivedFvPatchFields/mixedInternalEnergy/mixedInternalEnergyFvPatchScalarField.C
|
|||
derivedFvPatchFields/wallHeatTransfer/wallHeatTransferFvPatchScalarField.C
|
||||
|
||||
derivedFvPatchFields/temperatureDirectedInletOutletVelocity/temperatureDirectedInletOutletVelocityFvPatchVectorField.C
|
||||
derivedFvPatchFields/isentropicTotalPressure/isentropicTotalPressureFvPatchScalarField.C
|
||||
derivedFvPatchFields/isentropicTotalTemperature/isentropicTotalTemperatureFvPatchScalarField.C
|
||||
|
||||
LIB = $(FOAM_LIBBIN)/libbasicThermophysicalModels
|
||||
|
|
|
@ -0,0 +1,212 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "isentropicTotalPressureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "basicThermo.H"
|
||||
#include "isentropicTotalTemperatureFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::isentropicTotalPressureFvPatchScalarField::
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_("U"),
|
||||
TName_("T"),
|
||||
p0_(p.size(), 0.0)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalPressureFvPatchScalarField::
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
UName_(dict.lookupOrDefault<word>("U", "U")),
|
||||
TName_(dict.lookupOrDefault<word>("T", "T")),
|
||||
p0_("p0", dict, p.size())
|
||||
{
|
||||
if (dict.found("value"))
|
||||
{
|
||||
fvPatchField<scalar>::operator=
|
||||
(
|
||||
scalarField("value", dict, p.size())
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
fvPatchField<scalar>::operator=(p0_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Foam::isentropicTotalPressureFvPatchScalarField::
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
UName_(ptf.UName_),
|
||||
TName_(ptf.TName_),
|
||||
p0_(ptf.p0_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalPressureFvPatchScalarField::
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf),
|
||||
UName_(ptf.UName_),
|
||||
TName_(ptf.TName_),
|
||||
p0_(ptf.p0_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalPressureFvPatchScalarField::
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, iF),
|
||||
UName_(ptf.UName_),
|
||||
TName_(ptf.TName_),
|
||||
p0_(ptf.p0_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::isentropicTotalPressureFvPatchScalarField::autoMap
|
||||
(
|
||||
const fvPatchFieldMapper& m
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
p0_.autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
void Foam::isentropicTotalPressureFvPatchScalarField::rmap
|
||||
(
|
||||
const fvPatchScalarField& ptf,
|
||||
const labelList& addr
|
||||
)
|
||||
{
|
||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
||||
|
||||
const isentropicTotalPressureFvPatchScalarField& tiptf =
|
||||
refCast<const isentropicTotalPressureFvPatchScalarField>(ptf);
|
||||
|
||||
p0_.rmap(tiptf.p0_, addr);
|
||||
}
|
||||
|
||||
|
||||
void Foam::isentropicTotalPressureFvPatchScalarField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get velocity
|
||||
const fvPatchVectorField& U =
|
||||
patch().lookupPatchField<volVectorField, scalar>(UName_);
|
||||
|
||||
// Get temperature
|
||||
const fvPatchScalarField& T =
|
||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
||||
|
||||
const basicThermo& thermo =
|
||||
db().lookupObject<basicThermo>("thermophysicalProperties");
|
||||
|
||||
scalarField Cp = thermo.Cp(T, patch().index());
|
||||
scalarField Cv = thermo.Cv(T, patch().index());
|
||||
|
||||
scalarField gamma = Cp/Cv;
|
||||
scalarField R = Cp - Cv;
|
||||
|
||||
scalarField Ma = -(patch().nf() & U)/sqrt(gamma*R*T);
|
||||
|
||||
scalarField a = 1 + 0.5*(gamma - 1)*sqr(Ma);
|
||||
|
||||
operator==(p0_*pow(a, -gamma/(gamma - 1)));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
void Foam::isentropicTotalPressureFvPatchScalarField::updateCoeffs
|
||||
(
|
||||
const vectorField& Up
|
||||
)
|
||||
{
|
||||
updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::isentropicTotalPressureFvPatchScalarField::write
|
||||
(
|
||||
Ostream& os
|
||||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
writeEntryIfDifferent<word>(os, "T", "T", TName_);
|
||||
p0_.writeEntry("p0", os);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
makePatchTypeField
|
||||
(
|
||||
fvPatchScalarField,
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
);
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -0,0 +1,189 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | foam-extend: Open Source CFD
|
||||
\\ / O peration |
|
||||
\\ / A nd | For copyright notice see file Copyright
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of foam-extend.
|
||||
|
||||
foam-extend is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the
|
||||
Free Software Foundation, either version 3 of the License, or (at your
|
||||
option) any later version.
|
||||
|
||||
foam-extend is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Class
|
||||
Foam::isentropicTotalPressureFvPatchScalarField
|
||||
|
||||
Description
|
||||
Foam::isentropicTotalPressureFvPatchScalarField
|
||||
|
||||
SourceFiles
|
||||
isentropicTotalPressureFvPatchScalarField.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef isentropicTotalPressureFvPatchScalarField_H
|
||||
#define isentropicTotalPressureFvPatchScalarField_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class isentropicTotalPressureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class isentropicTotalPressureFvPatchScalarField
|
||||
:
|
||||
public fixedValueFvPatchScalarField
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of the velocity field
|
||||
word UName_;
|
||||
|
||||
//- Name of the static temperature field
|
||||
word TName_;
|
||||
|
||||
//- Total pressure field
|
||||
scalarField p0_;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("isentropicTotalPressure");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping given
|
||||
// isentropicTotalPressureFvPatchScalarField onto a new patch
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<scalar, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp<fvPatchScalarField> clone() const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new isentropicTotalPressureFvPatchScalarField(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
isentropicTotalPressureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalPressureFvPatchScalarField&,
|
||||
const DimensionedField<scalar, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp<fvPatchScalarField> clone
|
||||
(
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp<fvPatchScalarField>
|
||||
(
|
||||
new isentropicTotalPressureFvPatchScalarField(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
// Access
|
||||
|
||||
//- Return the total pressure
|
||||
const scalarField& p0() const
|
||||
{
|
||||
return p0_;
|
||||
}
|
||||
|
||||
//- Return reference to the total pressure to allow adjustment
|
||||
scalarField& p0()
|
||||
{
|
||||
return p0_;
|
||||
}
|
||||
|
||||
|
||||
// Mapping functions
|
||||
|
||||
//- Map (and resize as needed) from self given a mapping object
|
||||
virtual void autoMap
|
||||
(
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
||||
virtual void rmap
|
||||
(
|
||||
const fvPatchScalarField&,
|
||||
const labelList&
|
||||
);
|
||||
|
||||
|
||||
// Evaluation functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
// using the given patch velocity field
|
||||
virtual void updateCoeffs(const vectorField& Up);
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
||||
//- Write
|
||||
virtual void write(Ostream&) const;
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -26,10 +26,8 @@ License
|
|||
#include "isentropicTotalTemperatureFvPatchScalarField.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
|
||||
#include "basicThermo.H"
|
||||
#include "isentropicTotalPressureFvPatchScalarField.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -41,25 +39,8 @@ isentropicTotalTemperatureFvPatchScalarField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
pName_("Undefined"),
|
||||
T0_(p.size(), 0.0),
|
||||
p0_(p.size(), 0.0)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalTemperatureFvPatchScalarField::
|
||||
isentropicTotalTemperatureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalTemperatureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
pName_(ptf.pName_),
|
||||
T0_(ptf.T0_, mapper),
|
||||
p0_(ptf.p0_, mapper)
|
||||
pName_("p"),
|
||||
T0_(p.size(), 0.0)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -72,9 +53,8 @@ isentropicTotalTemperatureFvPatchScalarField
|
|||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(p, iF),
|
||||
pName_(dict.lookup("p")),
|
||||
T0_("T0", dict, p.size()),
|
||||
p0_("p0", dict, p.size())
|
||||
pName_(dict.lookupOrDefault<word>("p", "p")),
|
||||
T0_("T0", dict, p.size())
|
||||
{
|
||||
if (dict.found("value"))
|
||||
{
|
||||
|
@ -93,27 +73,40 @@ isentropicTotalTemperatureFvPatchScalarField
|
|||
Foam::isentropicTotalTemperatureFvPatchScalarField::
|
||||
isentropicTotalTemperatureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalTemperatureFvPatchScalarField& tppsf
|
||||
const isentropicTotalTemperatureFvPatchScalarField& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<scalar, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(tppsf),
|
||||
pName_(tppsf.pName_),
|
||||
T0_(tppsf.T0_),
|
||||
p0_(tppsf.p0_)
|
||||
fixedValueFvPatchScalarField(ptf, p, iF, mapper),
|
||||
pName_(ptf.pName_),
|
||||
T0_(ptf.T0_, mapper)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalTemperatureFvPatchScalarField::
|
||||
isentropicTotalTemperatureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalTemperatureFvPatchScalarField& tppsf,
|
||||
const isentropicTotalTemperatureFvPatchScalarField& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(ptf),
|
||||
pName_(ptf.pName_),
|
||||
T0_(ptf.T0_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::isentropicTotalTemperatureFvPatchScalarField::
|
||||
isentropicTotalTemperatureFvPatchScalarField
|
||||
(
|
||||
const isentropicTotalTemperatureFvPatchScalarField& ptf,
|
||||
const DimensionedField<scalar, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchScalarField(tppsf, iF),
|
||||
pName_(tppsf.pName_),
|
||||
T0_(tppsf.T0_),
|
||||
p0_(tppsf.p0_)
|
||||
fixedValueFvPatchScalarField(ptf, iF),
|
||||
pName_(ptf.pName_),
|
||||
T0_(ptf.T0_)
|
||||
{}
|
||||
|
||||
|
||||
|
@ -126,7 +119,6 @@ void Foam::isentropicTotalTemperatureFvPatchScalarField::autoMap
|
|||
{
|
||||
fixedValueFvPatchScalarField::autoMap(m);
|
||||
T0_.autoMap(m);
|
||||
p0_.autoMap(m);
|
||||
}
|
||||
|
||||
|
||||
|
@ -142,7 +134,6 @@ void Foam::isentropicTotalTemperatureFvPatchScalarField::rmap
|
|||
refCast<const isentropicTotalTemperatureFvPatchScalarField>(ptf);
|
||||
|
||||
T0_.rmap(tiptf.T0_, addr);
|
||||
p0_.rmap(tiptf.p0_, addr);
|
||||
}
|
||||
|
||||
|
||||
|
@ -152,24 +143,28 @@ void Foam::isentropicTotalTemperatureFvPatchScalarField::updateCoeffs()
|
|||
{
|
||||
return;
|
||||
}
|
||||
const fvPatchField<scalar>& p =
|
||||
|
||||
// Get pressure and temperature
|
||||
const scalarField& T = *this;
|
||||
|
||||
const fvPatchScalarField& pp =
|
||||
patch().lookupPatchField<volScalarField, scalar>(pName_);
|
||||
|
||||
const isentropicTotalPressureFvPatchScalarField& p =
|
||||
refCast<const isentropicTotalPressureFvPatchScalarField>(pp);
|
||||
|
||||
const basicThermo& thermo =
|
||||
db().lookupObject<basicThermo>("thermophysicalProperties");
|
||||
|
||||
volScalarField gamma = thermo.Cp()/thermo.Cv();
|
||||
scalarField gamma =
|
||||
thermo.Cp(T, patch().index())/thermo.Cv(T, patch().index());
|
||||
|
||||
const fvPatchField<scalar>& gammap =
|
||||
patch().patchField<volScalarField, scalar>(gamma);
|
||||
|
||||
scalarField gM1ByG = (gammap - 1.0)/gammap;
|
||||
|
||||
operator==(T0_*pow(p/p0_,gM1ByG));
|
||||
operator==(T0_*pow(p/p.p0(), (gamma - 1)/gamma));
|
||||
|
||||
fixedValueFvPatchScalarField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::isentropicTotalTemperatureFvPatchScalarField::updateCoeffs
|
||||
(
|
||||
const vectorField& Up
|
||||
|
@ -185,9 +180,8 @@ void Foam::isentropicTotalTemperatureFvPatchScalarField::write
|
|||
) const
|
||||
{
|
||||
fixedValueFvPatchScalarField::write(os);
|
||||
os.writeKeyword("p") << pName_ << token::END_STATEMENT << nl;
|
||||
writeEntryIfDifferent<word>(os, "p", "p", pName_);
|
||||
T0_.writeEntry("T0", os);
|
||||
p0_.writeEntry("p0", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace Foam
|
|||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
Class isentropicTotalTemperatureFvPatch Declaration
|
||||
Class isentropicTotalTemperatureFvPatchScalarField Declaration
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class isentropicTotalTemperatureFvPatchScalarField
|
||||
|
@ -58,8 +58,6 @@ class isentropicTotalTemperatureFvPatchScalarField
|
|||
//- Total temperature field
|
||||
scalarField T0_;
|
||||
|
||||
//- Total pressure field
|
||||
scalarField p0_;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.01;//HJ
|
||||
// fieldInf 300;
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
// type waveTransmissive;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet true;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.0;
|
||||
// fieldInf 300;
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
WALL3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
SYMP5
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
SYMP6
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,83 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
// ddt(rho,U) steadyInertial phi rho 1;
|
||||
ddt(rho,U) steadyState;
|
||||
// ddt(rho,h) steadyState;
|
||||
ddt(rho,h) steadyInertial phi rho 1;
|
||||
ddt(psi,p) steadyInertial phi rho 1;
|
||||
|
||||
U steadyState;
|
||||
T steadyState;
|
||||
p steadyState;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default Gauss linear;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
|
||||
div(phi,U) Gauss upwind;
|
||||
// div(phi,U) Gauss linearUpwind faceLimited Gauss linear 1.0;
|
||||
// div(phi,U) Gauss blended 0.9;
|
||||
// div(phi,U) Gauss vanLeerDC;
|
||||
// div(phi,U) Gauss SuperBeeDC;
|
||||
// div(phi,U) Gauss GammaVDC 0.5;
|
||||
|
||||
// div(phi,h) Gauss upwind;
|
||||
// div(phi,h) Gauss GammaDC 0.5;
|
||||
div(phi,h) Gauss vanLeerDC;
|
||||
|
||||
// div(phid,p) Gauss upwind;
|
||||
div(phid,p) Gauss vanLeerDC;
|
||||
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
|
||||
div(U,p) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
p;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,74 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
{
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.01;//HJ
|
||||
// fieldInf 300;
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
// type zeroGradient;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U U;
|
||||
gamma 1.4;
|
||||
inletOutlet true;
|
||||
correctSupercritical false;
|
||||
lInf 0.5;
|
||||
fieldInf 300;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
WALL3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,74 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 101325;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.0;
|
||||
// fieldInf 101325;
|
||||
// value uniform 101325;
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
// type fixedValue;
|
||||
// value uniform 101325;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U U;
|
||||
gamma 1.4;
|
||||
inletOutlet false;
|
||||
correctSupercritical true;
|
||||
lInf 0.5;
|
||||
fieldInf 101325;
|
||||
value uniform 101325;
|
||||
}
|
||||
|
||||
WALL3
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
cleanCase
|
||||
\rm -rf VTK
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
application="steadyCompressibleFoam"
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
|
@ -1,86 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
vertices
|
||||
(
|
||||
(-1.5 0 -0.1)
|
||||
(-0.5 0 -0.1)
|
||||
( 0.5 0 -0.1)
|
||||
( 1.5 0 -0.1)
|
||||
|
||||
(-1.5 1 -0.1)
|
||||
(-0.5 1 -0.1)
|
||||
( 0.5 1 -0.1)
|
||||
( 1.5 1 -0.1)
|
||||
|
||||
(-1.5 0 0.1)
|
||||
(-0.5 0 0.1)
|
||||
( 0.5 0 0.1)
|
||||
( 1.5 0 0.1)
|
||||
|
||||
(-1.5 1 0.1)
|
||||
(-0.5 1 0.1)
|
||||
( 0.5 1 0.1)
|
||||
( 1.5 1 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 8 9 13 12) (110 160 1) simpleGrading (1 1 1)
|
||||
hex (1 2 6 5 9 10 14 13) (110 160 1) simpleGrading (1 1 1)
|
||||
hex (2 3 7 6 10 11 15 14) (110 160 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 1 2 (0 0.1 -0.1)
|
||||
arc 9 10 (0 0.1 0.1)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch INLE1
|
||||
(
|
||||
(0 8 12 4)
|
||||
)
|
||||
|
||||
patch PRES2
|
||||
(
|
||||
(3 7 15 11)
|
||||
)
|
||||
|
||||
wall WALL3
|
||||
(
|
||||
(4 12 13 5)
|
||||
(5 13 14 6)
|
||||
(6 14 15 7)
|
||||
)
|
||||
|
||||
wall WALL4
|
||||
(
|
||||
(0 1 9 8)
|
||||
(1 2 10 9)
|
||||
(2 3 11 10)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,106 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 10000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
graphFormat raw;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
functions
|
||||
(
|
||||
flux
|
||||
{
|
||||
type divFlux;
|
||||
phiName phi;
|
||||
|
||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||
}
|
||||
|
||||
Mach
|
||||
{
|
||||
type MachNumber;
|
||||
UName U;
|
||||
|
||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||
}
|
||||
|
||||
minMaxU
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
|
||||
name U;
|
||||
}
|
||||
|
||||
minMaxP
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
|
||||
name p;
|
||||
}
|
||||
|
||||
minMaxRho
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
|
||||
name rho;
|
||||
}
|
||||
|
||||
minMaxT
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
|
||||
name T;
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
|
@ -1,76 +0,0 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
p
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner DILU;
|
||||
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
U
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner DILU;
|
||||
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
h
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner DILU;
|
||||
|
||||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 3;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
// Note: under-relaxation factors used in wave-transmissive schemes
|
||||
U 0.4;
|
||||
p 0.2;
|
||||
h 0.5;
|
||||
rho 0.5;
|
||||
T 1;
|
||||
}
|
||||
|
||||
fieldBounds
|
||||
{
|
||||
// With bounding
|
||||
p 50 1e6;
|
||||
T 20 3000;
|
||||
U 1000;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -9,44 +9,48 @@ FoamFile
|
|||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyBoundaryMesh;
|
||||
location "constant/polyMesh";
|
||||
object boundary;
|
||||
class volScalarField;
|
||||
object T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
5
|
||||
(
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
{
|
||||
type patch;
|
||||
nFaces 160;
|
||||
startFace 152960;
|
||||
type isentropicTotalTemperature;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi psi;
|
||||
p p;
|
||||
T0 uniform 327.335857;
|
||||
value uniform 300;
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
type patch;
|
||||
nFaces 160;
|
||||
startFace 153120;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
WALL3
|
||||
{
|
||||
type wall;
|
||||
nFaces 480;
|
||||
startFace 153280;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type wall;
|
||||
nFaces 480;
|
||||
startFace 153760;
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
nFaces 153600;
|
||||
startFace 154240;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -16,32 +16,20 @@ FoamFile
|
|||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (234 0 0);
|
||||
internalField uniform (234.636777 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (234 0 0);
|
||||
value uniform (234.636777 0 0);
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
|
||||
// type waveTransmissive;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet true;
|
||||
// correctSupercritical false;
|
||||
// lInf 0;
|
||||
// fieldInf (0 0 0);
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
WALL3
|
||||
|
@ -50,21 +38,17 @@ boundaryField
|
|||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
SYMP5
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
SYMP6
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -22,37 +22,16 @@ boundaryField
|
|||
{
|
||||
INLE1
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.0;
|
||||
// fieldInf 101325;
|
||||
// value uniform 101325;
|
||||
type isentropicTotalPressure;
|
||||
U U;
|
||||
p0 uniform 137491.986;
|
||||
value uniform 101325;
|
||||
}
|
||||
|
||||
PRES2
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 101325;
|
||||
|
||||
// type waveTransmissive;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical true;
|
||||
// lInf 0.1;
|
||||
// fieldInf 101325;
|
||||
// value uniform 101325;
|
||||
}
|
||||
|
||||
WALL3
|
||||
|
@ -60,20 +39,16 @@ boundaryField
|
|||
type zeroGradient;
|
||||
}
|
||||
|
||||
SYMP5
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
SYMP6
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
|
||||
WALL4
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,27 +23,27 @@ vertices
|
|||
( 0.5 0 -0.1)
|
||||
( 1.5 0 -0.1)
|
||||
|
||||
(-1.5 1 -0.1)
|
||||
(-0.5 1 -0.1)
|
||||
( 0.5 1 -0.1)
|
||||
( 1.5 1 -0.1)
|
||||
(-1.5 1.5 -0.1)
|
||||
(-0.5 1.5 -0.1)
|
||||
( 0.5 1.5 -0.1)
|
||||
( 1.5 1.5 -0.1)
|
||||
|
||||
(-1.5 0 0.1)
|
||||
(-0.5 0 0.1)
|
||||
( 0.5 0 0.1)
|
||||
( 1.5 0 0.1)
|
||||
|
||||
(-1.5 1 0.1)
|
||||
(-0.5 1 0.1)
|
||||
( 0.5 1 0.1)
|
||||
( 1.5 1 0.1)
|
||||
(-1.5 1.5 0.1)
|
||||
(-0.5 1.5 0.1)
|
||||
( 0.5 1.5 0.1)
|
||||
( 1.5 1.5 0.1)
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 5 4 8 9 13 12) (160 160 1) simpleGrading (1 1 1)
|
||||
hex (1 2 6 5 9 10 14 13) (160 160 1) simpleGrading (1 1 1)
|
||||
hex (2 3 7 6 10 11 15 14) (160 160 1) simpleGrading (1 1 1)
|
||||
hex (0 1 5 4 8 9 13 12) (50 75 1) simpleGrading (1 1 1)
|
||||
hex (1 2 6 5 9 10 14 13) (50 75 1) simpleGrading (1 1 1)
|
||||
hex (2 3 7 6 10 11 15 14) (50 75 1) simpleGrading (1 1 1)
|
||||
);
|
||||
|
||||
edges
|
|
@ -20,32 +20,32 @@ FoamFile
|
|||
INLE1
|
||||
{
|
||||
type patch;
|
||||
nFaces 160;
|
||||
startFace 105110;
|
||||
nFaces 75;
|
||||
startFace 22275;
|
||||
}
|
||||
PRES2
|
||||
{
|
||||
type patch;
|
||||
nFaces 160;
|
||||
startFace 105270;
|
||||
nFaces 75;
|
||||
startFace 22350;
|
||||
}
|
||||
WALL3
|
||||
{
|
||||
type wall;
|
||||
nFaces 330;
|
||||
startFace 105430;
|
||||
nFaces 150;
|
||||
startFace 22425;
|
||||
}
|
||||
WALL4
|
||||
{
|
||||
type wall;
|
||||
nFaces 330;
|
||||
startFace 105760;
|
||||
nFaces 150;
|
||||
startFace 22575;
|
||||
}
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
nFaces 105600;
|
||||
startFace 106090;
|
||||
nFaces 22500;
|
||||
startFace 22725;
|
||||
}
|
||||
)
|
||||
|
|
@ -20,7 +20,7 @@ startTime 0;
|
|||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 2000;
|
||||
endTime 3000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
|
@ -34,7 +34,7 @@ writeFormat ascii;
|
|||
|
||||
writePrecision 6;
|
||||
|
||||
writeCompression uncompressed;
|
||||
writeCompression compressed;
|
||||
|
||||
timeFormat general;
|
||||
|
|
@ -18,11 +18,9 @@ ddtSchemes
|
|||
{
|
||||
default none;
|
||||
|
||||
// ddt(rho,U) steadyInertial phi rho 1;
|
||||
ddt(rho,U) steadyState;
|
||||
// ddt(rho,h) steadyState;
|
||||
ddt(rho,h) steadyInertial phi rho 1;
|
||||
ddt(psi,p) steadyInertial phi rho 1;
|
||||
ddt(rho,h) steadyState;
|
||||
ddt(psi,p) steadyInertial phi rho 0.5;
|
||||
|
||||
U steadyState;
|
||||
T steadyState;
|
||||
|
@ -40,23 +38,21 @@ divSchemes
|
|||
|
||||
div(phi,U) Gauss upwind;
|
||||
// div(phi,U) Gauss linearUpwind faceLimited Gauss linear 1.0;
|
||||
// div(phi,U) Gauss blended 0.9;
|
||||
// div(phi,U) Gauss vanLeerDC;
|
||||
// div(phi,U) Gauss SuperBeeDC;
|
||||
// div(phi,U) Gauss GammaVDC 0.5;
|
||||
|
||||
// div(phi,h) Gauss upwind;
|
||||
// div(phi,h) Gauss GammaDC 0.5;
|
||||
div(phi,h) Gauss vanLeerDC;
|
||||
div(phi,h) Gauss upwind;
|
||||
// div(phi,h) Gauss vanLeerDC;
|
||||
|
||||
// div(phid,p) Gauss upwind;
|
||||
div(phid,p) Gauss vanLeerDC;
|
||||
div(phid,p) Gauss upwind;
|
||||
// div(phid,p) Gauss vanLeerDC;
|
||||
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
|
||||
div(U,p) Gauss linear;
|
||||
|
||||
div(U) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
|
@ -16,6 +16,20 @@ FoamFile
|
|||
|
||||
solvers
|
||||
{
|
||||
// Coupled
|
||||
Up
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner Cholesky;
|
||||
|
||||
tolerance 1e-09;
|
||||
relTol 0.0;
|
||||
|
||||
minIter 1;
|
||||
maxIter 500;
|
||||
}
|
||||
|
||||
// Segregated
|
||||
p
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -25,7 +39,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
U
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -35,7 +49,8 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
|
||||
h
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -45,7 +60,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
|
@ -58,19 +73,19 @@ PIMPLE
|
|||
relaxationFactors
|
||||
{
|
||||
// Note: under-relaxation factors used in wave-transmissive schemes
|
||||
U 0.4;
|
||||
p 0.2;
|
||||
h 0.5;
|
||||
U 0.1;
|
||||
p 0.25;
|
||||
h 0.1;
|
||||
rho 0.5;
|
||||
T 1;
|
||||
T 0.5;
|
||||
}
|
||||
|
||||
fieldBounds
|
||||
{
|
||||
// With bounding
|
||||
p 50 1e6;
|
||||
T 20 3000;
|
||||
U 1000;
|
||||
p 5e4 3e5;
|
||||
T 230 500;
|
||||
U 500;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
|
@ -25,7 +25,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.001;
|
||||
};
|
||||
}
|
||||
U
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -78,14 +78,13 @@ PIMPLE
|
|||
relaxationFactors
|
||||
{
|
||||
// Note: under-relaxation factors used in wave-transmissive schemes
|
||||
U 0.5;
|
||||
p 0.2;
|
||||
U 0.7;
|
||||
p 1;
|
||||
i 0.1;
|
||||
h 0.5;
|
||||
rho 0.25;
|
||||
|
||||
k 0.2;
|
||||
epsilon 0.2;
|
||||
k 0.5;
|
||||
epsilon 0.5;
|
||||
}
|
||||
|
||||
fieldBounds
|
||||
|
|
|
@ -27,7 +27,7 @@ deltaT 1;
|
|||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
writeInterval 200;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
|
|
@ -42,10 +42,6 @@ divSchemes
|
|||
div(phi,i) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
|
||||
// div(phi,U) Gauss vanLeerDC;
|
||||
// div(phi,h) Gauss vanLeerDC;
|
||||
// div(phid,p) Gauss vanLeerDC;
|
||||
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
div((muEff*dev2(grad(U).T()))) Gauss linear;
|
||||
|
|
|
@ -24,8 +24,8 @@ solvers
|
|||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.001;
|
||||
};
|
||||
relTol 0.01;
|
||||
}
|
||||
U
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -90,11 +90,6 @@ relaxationFactors
|
|||
|
||||
fieldBounds
|
||||
{
|
||||
// No bounding
|
||||
// p 0 1e7;
|
||||
// T 0 10000;
|
||||
// U 1e6;
|
||||
|
||||
// With bounding
|
||||
p 2e4 1e6;
|
||||
T 200 500;
|
||||
|
|
|
@ -22,24 +22,19 @@ boundaryField
|
|||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
type totalTemperature;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi psi;
|
||||
U Uabs;
|
||||
gamma 1.4;
|
||||
T0 uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
// type zeroGradient;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U Urel;
|
||||
gamma 1.4;
|
||||
inletOutlet true;
|
||||
correctSupercritical false;
|
||||
lInf 0.0;
|
||||
fieldInf 300;
|
||||
type zeroGradient;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,34 +16,20 @@ FoamFile
|
|||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (234 0 0);
|
||||
internalField uniform (100 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type SRFVelocity;
|
||||
relative yes;
|
||||
inletValue uniform (234 0 0);
|
||||
value uniform (234 0 0);
|
||||
type pressureInletVelocity;
|
||||
value uniform (100 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
|
||||
// type waveTransmissive;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet true;
|
||||
// correctSupercritical false;
|
||||
// lInf 0;
|
||||
// fieldInf (0 0 0);
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
blade
|
||||
|
|
|
@ -52,7 +52,6 @@ boundaryField
|
|||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -58,7 +58,6 @@ boundaryField
|
|||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,36 +22,20 @@ boundaryField
|
|||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U Urel;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.0;
|
||||
// fieldInf 101325;
|
||||
// value uniform 101325;
|
||||
type totalPressure;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi psi;
|
||||
U Uabs;
|
||||
gamma 1.4;
|
||||
p0 uniform 1.4e5;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
// type fixedValue;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U Urel;
|
||||
gamma 1.4;
|
||||
inletOutlet false;
|
||||
correctSupercritical true;
|
||||
lInf 0.1;
|
||||
fieldInf 101325;
|
||||
value uniform 101325;
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
blade
|
||||
|
|
|
@ -17,12 +17,10 @@ FoamFile
|
|||
SRFModel rpm;
|
||||
|
||||
axis (1 0 0);
|
||||
// axis (-1 0 0);
|
||||
|
||||
rpmCoeffs
|
||||
{
|
||||
rpm 30000;
|
||||
// rpm 9600;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -16,6 +16,7 @@ FoamFile
|
|||
|
||||
thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
|
||||
// name, nMoles, mol weight, CP, Hf, mu, Pr;
|
||||
mixture air 1 28.9 1007 0 1.48e-5 0.7;
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -20,13 +20,13 @@ startTime 0;
|
|||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1500;
|
||||
endTime 2000;
|
||||
|
||||
deltaT 1;
|
||||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
writeInterval 200;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
|
|
@ -19,9 +19,8 @@ ddtSchemes
|
|||
default none;
|
||||
|
||||
ddt(rho,Urel) steadyState;
|
||||
ddt(rho,h) steadyState;
|
||||
// ddt(rho,h) steadyInertial phi rho 1;
|
||||
ddt(psi,p) steadyInertial phi rho 0.7;
|
||||
ddt(rho,i) steadyState;
|
||||
ddt(psi,p) steadyInertial phi rho 0.25;
|
||||
|
||||
ddt(rho,k) steadyState;
|
||||
ddt(rho,epsilon) steadyState;
|
||||
|
@ -39,13 +38,9 @@ gradSchemes
|
|||
divSchemes
|
||||
{
|
||||
default none;
|
||||
// div(phi,Urel) Gauss upwind;
|
||||
// div(phi,h) Gauss upwind;
|
||||
// div(phid,p) Gauss upwind;
|
||||
|
||||
div(phi,Urel) Gauss vanLeerDC;
|
||||
div(phi,h) Gauss vanLeerDC;
|
||||
div(phid,p) Gauss vanLeerDC;
|
||||
div(phi,Urel) Gauss upwind;
|
||||
div(phi,i) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
|
||||
div(phi,k) Gauss upwind;
|
||||
div(phi,epsilon) Gauss upwind;
|
||||
|
|
|
@ -24,8 +24,8 @@ solvers
|
|||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.001;
|
||||
};
|
||||
relTol 0.01;
|
||||
}
|
||||
Urel
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -35,8 +35,8 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
h
|
||||
}
|
||||
i
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner DILU;
|
||||
|
@ -45,7 +45,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
}
|
||||
k
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -54,8 +54,8 @@ solvers
|
|||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
relTol 0.0;
|
||||
}
|
||||
epsilon
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -64,14 +64,14 @@ solvers
|
|||
minIter 0;
|
||||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
relTol 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
nOuterCorrectors 1;
|
||||
nCorrectors 3;
|
||||
nCorrectors 2;
|
||||
nNonOrthogonalCorrectors 0;
|
||||
}
|
||||
|
||||
|
@ -80,24 +80,19 @@ relaxationFactors
|
|||
// Note: under-relaxation factors used in wave-transmissive schemes
|
||||
Urel 0.5;
|
||||
p 0.2;
|
||||
h 0.5;
|
||||
i 0.1;
|
||||
rho 0.5;
|
||||
|
||||
k 0.3;
|
||||
epsilon 0.3;
|
||||
k 0.2;
|
||||
epsilon 0.2;
|
||||
}
|
||||
|
||||
fieldBounds
|
||||
{
|
||||
// No bounding
|
||||
// p 0 1e7;
|
||||
// T 0 10000;
|
||||
// Urel 1e6;
|
||||
|
||||
// With bounding
|
||||
p 50 1e6;
|
||||
T 20 3000;
|
||||
Urel 1000;
|
||||
p 2e4 1e6;
|
||||
T 200 500;
|
||||
Urel 500;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -22,24 +22,19 @@ boundaryField
|
|||
{
|
||||
inlet
|
||||
{
|
||||
type fixedValue;
|
||||
type totalTemperature;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi psi;
|
||||
U Uabs;
|
||||
gamma 1.4;
|
||||
T0 uniform 300;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
// type zeroGradient;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U Urel;
|
||||
gamma 1.4;
|
||||
inletOutlet true;
|
||||
correctSupercritical false;
|
||||
lInf 0.0;
|
||||
fieldInf 300;
|
||||
type zeroGradient;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,34 +16,20 @@ FoamFile
|
|||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (234 0 0);
|
||||
internalField uniform (100 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
inlet
|
||||
{
|
||||
type SRFVelocity;
|
||||
relative yes;
|
||||
inletValue uniform (234 0 0);
|
||||
value uniform (234 0 0);
|
||||
type pressureInletVelocity;
|
||||
value uniform (100 0 0);
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
|
||||
// type waveTransmissive;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U U;
|
||||
// gamma 1.4;
|
||||
// inletOutlet true;
|
||||
// correctSupercritical false;
|
||||
// lInf 0;
|
||||
// fieldInf (0 0 0);
|
||||
// value $internalField;
|
||||
}
|
||||
|
||||
blade
|
||||
|
|
|
@ -52,7 +52,6 @@ boundaryField
|
|||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,6 @@ boundaryField
|
|||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
value uniform 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -58,7 +58,6 @@ boundaryField
|
|||
frontAndBack
|
||||
{
|
||||
type cyclic;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,36 +22,20 @@ boundaryField
|
|||
{
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
|
||||
// type waveTransmissiveInlet;
|
||||
// phi phi;
|
||||
// rho rho;
|
||||
// psi psi;
|
||||
// U Urel;
|
||||
// gamma 1.4;
|
||||
// inletOutlet false;
|
||||
// correctSupercritical false;
|
||||
// lInf 0.0;
|
||||
// fieldInf 101325;
|
||||
// value uniform 101325;
|
||||
type totalPressure;
|
||||
phi phi;
|
||||
rho none;
|
||||
psi psi;
|
||||
U Uabs;
|
||||
gamma 1.4;
|
||||
p0 uniform 1.4e5;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
// type fixedValue;
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U Urel;
|
||||
gamma 1.4;
|
||||
inletOutlet false;
|
||||
correctSupercritical true;
|
||||
lInf 0.1;
|
||||
fieldInf 101325;
|
||||
value uniform 101325;
|
||||
type fixedValue;
|
||||
value $internalField;
|
||||
}
|
||||
|
||||
blade
|
||||
|
|
|
@ -20,7 +20,6 @@ axis (-1 0 0);
|
|||
|
||||
rpmCoeffs
|
||||
{
|
||||
// rpm 15000;
|
||||
rpm 20000;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ deltaT 1;
|
|||
|
||||
writeControl timeStep;
|
||||
|
||||
writeInterval 50;
|
||||
writeInterval 200;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
|
|
@ -19,9 +19,8 @@ ddtSchemes
|
|||
default none;
|
||||
|
||||
ddt(rho,Urel) steadyState;
|
||||
ddt(rho,h) steadyState;
|
||||
// ddt(rho,h) steadyInertial phi rho 1;
|
||||
ddt(psi,p) steadyInertial phi rho 0.8;
|
||||
ddt(rho,i) steadyState;
|
||||
ddt(psi,p) steadyInertial phi rho 0.25;
|
||||
|
||||
ddt(rho,k) steadyState;
|
||||
ddt(rho,epsilon) steadyState;
|
||||
|
@ -40,7 +39,7 @@ divSchemes
|
|||
{
|
||||
default none;
|
||||
div(phi,Urel) Gauss upwind;
|
||||
div(phi,h) Gauss upwind;
|
||||
div(phi,i) Gauss upwind;
|
||||
div(phid,p) Gauss upwind;
|
||||
|
||||
div(phi,k) Gauss upwind;
|
||||
|
|
|
@ -25,7 +25,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
}
|
||||
Urel
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -35,8 +35,8 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
h
|
||||
}
|
||||
i
|
||||
{
|
||||
solver BiCGStab;
|
||||
preconditioner DILU;
|
||||
|
@ -45,7 +45,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.01;
|
||||
};
|
||||
}
|
||||
k
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -55,7 +55,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
epsilon
|
||||
{
|
||||
solver BiCGStab;
|
||||
|
@ -65,7 +65,7 @@ solvers
|
|||
maxIter 1000;
|
||||
tolerance 1e-8;
|
||||
relTol 0.0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
|
@ -79,25 +79,20 @@ relaxationFactors
|
|||
{
|
||||
// Note: under-relaxation factors used in wave-transmissive schemes
|
||||
Urel 0.5;
|
||||
p 0.3;
|
||||
h 0.5;
|
||||
p 0.2;
|
||||
i 0.1;
|
||||
rho 0.5;
|
||||
|
||||
k 0.5;
|
||||
epsilon 0.5;
|
||||
k 0.2;
|
||||
epsilon 0.2;
|
||||
}
|
||||
|
||||
fieldBounds
|
||||
{
|
||||
// No bounding
|
||||
// p 0 1e7;
|
||||
// T 0 10000;
|
||||
// Urel 1e6;
|
||||
|
||||
// With bounding
|
||||
p 50 1e6;
|
||||
T 20 3000;
|
||||
Urel 1000;
|
||||
p 2e4 1e6;
|
||||
T 200 500;
|
||||
Urel 500;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -50,4 +50,28 @@ maxCo 0.8;
|
|||
|
||||
maxDeltaT 0.01;
|
||||
|
||||
|
||||
functions
|
||||
(
|
||||
minMaxU
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs (/*"libsampling.so"*/ "libfieldFunctionObjects.so");
|
||||
|
||||
name U;
|
||||
}
|
||||
minMaxP
|
||||
{
|
||||
type minMaxField;
|
||||
|
||||
// Where to load it from (if not already in solver)
|
||||
functionObjectLibs ("libfieldFunctionObjects.so");
|
||||
|
||||
name p;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
|
@ -14,12 +14,6 @@ FoamFile
|
|||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in zones:
|
||||
// preserveFaceZones ( interface1_faces interface2_faces );
|
||||
|
||||
//- Keep owner and neighbour on same processor for faces in patches:
|
||||
// preservePatches ( interface1 interface2 );
|
||||
|
||||
globalFaceZones
|
||||
(
|
||||
interface1_faces
|
||||
|
@ -28,10 +22,9 @@ globalFaceZones
|
|||
rotor_cyclic_lower_faces
|
||||
); // Those are the names of the face zones created previously
|
||||
|
||||
numberOfSubdomains 4; // The problem will be decomposed in 4 different processors
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method scotch;
|
||||
// method metis;
|
||||
|
||||
simpleCoeffs
|
||||
{
|
||||
|
@ -39,32 +32,6 @@ simpleCoeffs
|
|||
delta 0.001;
|
||||
}
|
||||
|
||||
metisCoeffs
|
||||
{
|
||||
/*
|
||||
processorWeights
|
||||
(
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
);
|
||||
*/
|
||||
}
|
||||
|
||||
scotchCoeffs
|
||||
{
|
||||
//processorWeights
|
||||
//(
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
// 1
|
||||
//);
|
||||
//writeGraph true;
|
||||
//strategy "b";
|
||||
}
|
||||
|
||||
distributed no;
|
||||
|
||||
roots
|
||||
|
|
|
@ -33,12 +33,7 @@ divSchemes
|
|||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
laplacian(nu,U) Gauss linear corrected;
|
||||
laplacian(rAU,pcorr) Gauss linear corrected;
|
||||
laplacian(rAU,p) Gauss linear corrected;
|
||||
|
||||
laplacian((1|A(U)),p) Gauss linear corrected;
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
|
|
|
@ -10,56 +10,62 @@ FoamFile
|
|||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (173 0 0);
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
INLE1
|
||||
upstreamMixingPlanePatch
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (173 0 0);
|
||||
type mixingPlane;
|
||||
}
|
||||
|
||||
PRES2
|
||||
downstreamMixingPlanePatch
|
||||
{
|
||||
// type inletOutlet;
|
||||
// inletValue uniform (0 0 0);
|
||||
|
||||
type waveTransmissive;
|
||||
phi phi;
|
||||
rho rho;
|
||||
psi psi;
|
||||
U U;
|
||||
gamma 1.4;
|
||||
inletOutlet true;
|
||||
correctSupercritical false;
|
||||
lInf 0.5;
|
||||
fieldInf (0 0 0);
|
||||
value $internalField;
|
||||
type mixingPlane;
|
||||
}
|
||||
|
||||
WALL3
|
||||
upstreamPerio1
|
||||
{
|
||||
type fixedValue;
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
upstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
inflow
|
||||
{
|
||||
type surfaceNormalFixedValue;
|
||||
refValue uniform -10;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
WALL4
|
||||
outflow
|
||||
{
|
||||
type fixedValue;
|
||||
type inletOutlet;
|
||||
inletValue uniform (0 0 0);
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | foam-extend: Open Source CFD |
|
||||
| \\ / O peration | Version: 3.1 |
|
||||
| \\ / A nd | Web: http://www.extend-project.de |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object epsilon;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [ 0 2 -3 0 0 0 0 ];
|
||||
|
||||
internalField uniform 0.1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
downstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
upstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
downstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
upstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
downstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
inflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.1;
|
||||
}
|
||||
outflow
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -9,14 +9,61 @@ FoamFile
|
|||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object thermophysicalProperties;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object k;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
// name, nMoles, mol weight, CP, Hf, mu, Pr;
|
||||
mixture air 1 28.9 1007 0 0 0.7;
|
||||
internalField uniform 0.01;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
downstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
upstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
downstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
upstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
inflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0.01;
|
||||
}
|
||||
outflow
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -9,24 +9,60 @@ FoamFile
|
|||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object RASProperties;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
RASModel laminar;
|
||||
dimensions [ 0 2 -2 0 0 0 0 ];
|
||||
|
||||
turbulence on;
|
||||
internalField uniform 0;
|
||||
|
||||
printCoeffs on;
|
||||
|
||||
laminarCoeffs
|
||||
{}
|
||||
|
||||
wallFunctionCoeffs
|
||||
boundaryField
|
||||
{
|
||||
kappa 0.4187;
|
||||
E 9;
|
||||
downstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
upstreamMixingPlanePatch
|
||||
{
|
||||
type mixingPlane;
|
||||
}
|
||||
downstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
upstreamWall
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
upstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
upstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio1
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
downstreamPerio2
|
||||
{
|
||||
type cyclicGgi;
|
||||
}
|
||||
inflow
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
outflow
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
|
@ -5,4 +5,4 @@
|
|||
|
||||
cleanCase
|
||||
\rm constant/polyMesh/blockMeshDict constant/polyMesh/boundary
|
||||
\rm -r 0
|
||||
\rm -rf 0 ; cp -r save 0
|
||||
|
|
|
@ -9,11 +9,7 @@ runApplication blockMesh
|
|||
|
||||
runApplication setSet -batch setBatch.batch
|
||||
runApplication setsToZones -noFlipMap
|
||||
|
||||
cp -r save 0
|
||||
|
||||
runApplication potentialFoam
|
||||
|
||||
runApplication simpleFoam
|
||||
|
||||
|
||||
|
|
|
@ -14,9 +14,10 @@ FoamFile
|
|||
}
|
||||
numberOfSubdomains 4;
|
||||
|
||||
method manual; //metis; //simple;
|
||||
method metis; //metis; //simple;
|
||||
|
||||
globalFaceZones (
|
||||
globalFaceZones
|
||||
(
|
||||
ggi1DomBZone
|
||||
ggi1DomAZone
|
||||
ggi2DomBZone
|
||||
|
|
Reference in a new issue