Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.3.x
This commit is contained in:
commit
0eb39ebe0f
11 changed files with 47 additions and 74 deletions
|
|
@ -46,14 +46,18 @@ if (mesh.changing())
|
|||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
fvm::laplacian(rAUf, pcorr) == fvc::div(phi) - divrhoU
|
||||
fvm::ddt(psi, pcorr)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rAUf, pcorr)
|
||||
==
|
||||
divrhoU
|
||||
);
|
||||
|
||||
pcorrEqn.solve();
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pcorrEqn.flux();
|
||||
phi += pcorrEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,5 +112,10 @@ K = 0.5*magSqr(U);
|
|||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(p) - fvc::div(fvc::meshPhi(rho, U), p);
|
||||
dpdt = fvc::ddt(p);
|
||||
|
||||
if (mesh.moving())
|
||||
{
|
||||
dpdt -= fvc::div(fvc::meshPhi(rho, U), p);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,11 +96,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& epsilon =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -108,6 +103,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = epsilon.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
|
|
@ -98,11 +98,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& omega =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -110,6 +105,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = omega.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -145,38 +145,6 @@ flowRateInletVelocityFvPatchVectorField
|
|||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs
|
||||
(
|
||||
const scalar uniformRho
|
||||
)
|
||||
{
|
||||
if (updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const scalar t = db().time().timeOutputValue();
|
||||
|
||||
// a simpler way of doing this would be nice
|
||||
const scalar avgU = -flowRate_->value(t)/gSum(patch().magSf());
|
||||
|
||||
tmp<vectorField> n = patch().nf();
|
||||
|
||||
if (volumetric_ || rhoName_ == "none")
|
||||
{
|
||||
// volumetric flow-rate
|
||||
operator==(n*avgU);
|
||||
}
|
||||
else
|
||||
{
|
||||
// mass flow-rate
|
||||
operator==(n*avgU/uniformRho);
|
||||
}
|
||||
|
||||
fixedValueFvPatchVectorField::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs()
|
||||
{
|
||||
if (updated())
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -71,7 +71,7 @@ Description
|
|||
rhoInlet 1.0;
|
||||
}
|
||||
\endverbatim
|
||||
|
||||
|
||||
The \c flowRate entry is a \c DataEntry type, meaning that it can be
|
||||
specified as constant, a polynomial fuction of time, and ...
|
||||
|
||||
|
|
@ -195,10 +195,6 @@ public:
|
|||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field given
|
||||
// uniform density field
|
||||
void updateCoeffs(const scalar uniformRho);
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
|
||||
|
|
|
|||
|
|
@ -441,7 +441,7 @@ const surfaceScalarField& fvMesh::phi() const
|
|||
{
|
||||
FatalErrorIn("fvMesh::phi()")
|
||||
<< "mesh flux field does not exist, is the mesh actually moving?"
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
// Set zero current time
|
||||
|
|
@ -461,7 +461,7 @@ surfaceScalarField& fvMesh::setPhi()
|
|||
{
|
||||
FatalErrorIn("fvMesh::setPhi()")
|
||||
<< "mesh flux field does not exist, is the mesh actually moving?"
|
||||
<< exit(FatalError);
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
return *phiPtr_;
|
||||
|
|
|
|||
|
|
@ -98,11 +98,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& epsilon =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -110,6 +105,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = epsilon.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
|
|
@ -100,11 +100,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& omega =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -112,6 +107,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = omega.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
|
|
@ -98,11 +98,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& epsilon =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -110,6 +105,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = epsilon.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
|
|
@ -100,11 +100,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster()
|
|||
|
||||
void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
{
|
||||
if (initialised_)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const volScalarField& omega =
|
||||
static_cast<const volScalarField&>(this->dimensionedInternalField());
|
||||
|
||||
|
|
@ -112,6 +107,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
|||
|
||||
const fvMesh& mesh = omega.mesh();
|
||||
|
||||
if (initialised_ && !mesh.changing())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
volScalarField weights
|
||||
(
|
||||
IOobject
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue