mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -87,7 +87,7 @@
|
||||
forAll(Y, i)
|
||||
{
|
||||
Y[i] = Y0[i];
|
||||
h0 += Y0[i]*specieData[i].Hs(p[i], T0);
|
||||
h0 += Y0[i]*specieData[i].Hs(p[0], T0);
|
||||
}
|
||||
|
||||
thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0);
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
EXE_INC = \
|
||||
-I../buoyantBoussinesqSimpleFoam \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
|
||||
@ -9,6 +12,8 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lfvOptions \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
|
||||
@ -11,12 +11,18 @@
|
||||
- fvm::laplacian(alphaEff, T)
|
||||
==
|
||||
radiation->ST(rhoCpRef, T)
|
||||
+ fvOptions(T)
|
||||
);
|
||||
|
||||
TEqn.relax();
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
TEqn.solve();
|
||||
|
||||
radiation->correct();
|
||||
|
||||
fvOptions.correct(T);
|
||||
|
||||
rhok = 1.0 - beta*(T - TRef);
|
||||
}
|
||||
|
||||
@ -5,10 +5,14 @@
|
||||
fvm::ddt(U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
fvOptions(U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
@ -23,4 +27,6 @@
|
||||
)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
|
||||
@ -48,8 +48,9 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "radiationModel.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "pimpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -61,6 +62,7 @@ int main(int argc, char *argv[])
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createIncompressibleRadiationModel.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude \
|
||||
-I$(LIB_SRC)/turbulenceModels \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
@ -7,7 +10,9 @@ EXE_INC = \
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lsampling \
|
||||
-lmeshTools \
|
||||
-lfvOptions \
|
||||
-lincompressibleTurbulenceModel \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleTransportModels
|
||||
|
||||
@ -8,10 +8,17 @@
|
||||
(
|
||||
fvm::div(phi, T)
|
||||
- fvm::laplacian(alphaEff, T)
|
||||
==
|
||||
fvOptions(T)
|
||||
);
|
||||
|
||||
TEqn.relax();
|
||||
|
||||
fvOptions.constrain(TEqn);
|
||||
|
||||
TEqn.solve();
|
||||
|
||||
fvOptions.correct(T);
|
||||
|
||||
rhok = 1.0 - beta*(T - TRef);
|
||||
}
|
||||
|
||||
@ -4,16 +4,20 @@
|
||||
(
|
||||
fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
fvOptions(U)
|
||||
);
|
||||
|
||||
UEqn().relax();
|
||||
|
||||
fvOptions.constrain(UEqn());
|
||||
|
||||
if (simple.momentumPredictor())
|
||||
{
|
||||
solve
|
||||
(
|
||||
UEqn()
|
||||
==
|
||||
==
|
||||
fvc::reconstruct
|
||||
(
|
||||
(
|
||||
@ -22,4 +26,6 @@
|
||||
)*mesh.magSf()
|
||||
)
|
||||
);
|
||||
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
|
||||
@ -48,6 +48,7 @@ Description
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "RASModel.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#include "simpleControl.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
@ -59,6 +60,7 @@ int main(int argc, char *argv[])
|
||||
#include "createMesh.H"
|
||||
#include "readGravitationalAcceleration.H"
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
simpleControl simple(mesh);
|
||||
|
||||
@ -254,31 +254,47 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
||||
/Pstream::nProcs()
|
||||
);
|
||||
|
||||
std::list<Cell_handle> infinite_cells;
|
||||
Triangulation::incident_cells
|
||||
(
|
||||
Triangulation::infinite_vertex(),
|
||||
std::back_inserter(infinite_cells)
|
||||
);
|
||||
|
||||
for
|
||||
(
|
||||
All_cells_iterator cit = Triangulation::all_cells_begin();
|
||||
cit != Triangulation::all_cells_end();
|
||||
typename std::list<Cell_handle>::iterator vcit = infinite_cells.begin();
|
||||
vcit != infinite_cells.end();
|
||||
++vcit
|
||||
)
|
||||
{
|
||||
Cell_handle cit = *vcit;
|
||||
|
||||
// Index of infinite vertex in this cell.
|
||||
int i = cit->index(Triangulation::infinite_vertex());
|
||||
|
||||
Cell_handle c = cit->neighbor(i);
|
||||
|
||||
if (c->unassigned())
|
||||
{
|
||||
c->cellIndex() = this->getNewCellIndex();
|
||||
|
||||
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
||||
{
|
||||
cellToCheck.insert(c->cellIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for
|
||||
(
|
||||
Finite_cells_iterator cit = Triangulation::finite_cells_begin();
|
||||
cit != Triangulation::finite_cells_end();
|
||||
++cit
|
||||
)
|
||||
{
|
||||
if (Triangulation::is_infinite(cit))
|
||||
{
|
||||
// Index of infinite vertex in this cell.
|
||||
int i = cit->index(Triangulation::infinite_vertex());
|
||||
|
||||
Cell_handle c = cit->neighbor(i);
|
||||
|
||||
if (c->unassigned())
|
||||
{
|
||||
c->cellIndex() = this->getNewCellIndex();
|
||||
|
||||
if (checkProcBoundaryCell(c, circumsphereOverlaps))
|
||||
{
|
||||
cellToCheck.insert(c->cellIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (cit->parallelDualVertex())
|
||||
if (cit->parallelDualVertex())
|
||||
{
|
||||
if (cit->unassigned())
|
||||
{
|
||||
@ -315,12 +331,20 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells
|
||||
continue;
|
||||
}
|
||||
|
||||
checkProcBoundaryCell
|
||||
if
|
||||
(
|
||||
citNeighbor,
|
||||
circumsphereOverlaps
|
||||
);
|
||||
checkProcBoundaryCell
|
||||
(
|
||||
citNeighbor,
|
||||
circumsphereOverlaps
|
||||
)
|
||||
)
|
||||
{
|
||||
cellToCheck.insert(citNeighbor->cellIndex());
|
||||
}
|
||||
}
|
||||
|
||||
cellToCheck.unset(cit->cellIndex());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -521,7 +545,6 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices
|
||||
<< originalParallelVertices[vI].procIndex()
|
||||
<< " " << originalParallelVertices[vI].index() << endl;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
mesh.magSf()
|
||||
* mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* fvc::interpolate(RASModel->nuEff())
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
),
|
||||
mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* (mag(phi)/mesh.magSf())*(runTime.deltaT()/nu)
|
||||
mag(phi)
|
||||
/(
|
||||
mesh.magSf()
|
||||
* mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* nu
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
mesh,
|
||||
IOobject::NO_READ
|
||||
),
|
||||
mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu)
|
||||
mag(phi)
|
||||
/(
|
||||
mesh.magSf()
|
||||
* mesh.surfaceInterpolation::deltaCoeffs()
|
||||
* mu
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
|
||||
// can also check how many cells exceed a particular Pe limit
|
||||
/*
|
||||
{
|
||||
label count = 0;
|
||||
label PeLimit = 200;
|
||||
forAll(PePtr(), i)
|
||||
{
|
||||
if (PePtr()[i] > PeLimit)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Info<< "Fraction > " << PeLimit << " = "
|
||||
<< scalar(count)/Pe.size() << endl;
|
||||
}
|
||||
*/
|
||||
|
||||
Info<< "Pe max : " << max(PePtr()).value() << endl;
|
||||
|
||||
if (writeResults)
|
||||
|
||||
@ -78,6 +78,7 @@ motionControl
|
||||
|
||||
objOutput no;
|
||||
timeChecks no;
|
||||
printVertexInfo off;
|
||||
|
||||
maxLoadUnbalance 0.2;
|
||||
|
||||
|
||||
@ -63,11 +63,11 @@ public:
|
||||
//- Store object pointer
|
||||
inline explicit autoPtr(T* = 0);
|
||||
|
||||
//- Construct as copy by transfering pointer to this autoPtr and
|
||||
//- Construct as copy by transferring pointer to this autoPtr and
|
||||
// setting the arguments pointer to NULL
|
||||
inline autoPtr(const autoPtr<T>&);
|
||||
|
||||
//- Construct either by transfering pointer or cloning. Should
|
||||
//- Construct either by transferring pointer or cloning. Should
|
||||
// only be called with type that supports cloning.
|
||||
inline autoPtr(const autoPtr<T>&, const bool reUse);
|
||||
|
||||
|
||||
@ -88,7 +88,17 @@ Foam::porosityModel::porosityModel
|
||||
const word& cellZoneName
|
||||
)
|
||||
:
|
||||
MeshObject<fvMesh, Foam::UpdateableMeshObject, porosityModel>(mesh),
|
||||
regIOobject
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
name,
|
||||
mesh.time().timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
name_(name),
|
||||
mesh_(mesh),
|
||||
dict_(dict),
|
||||
|
||||
@ -36,7 +36,6 @@ SourceFiles
|
||||
#ifndef porosityModel_H
|
||||
#define porosityModel_H
|
||||
|
||||
#include "MeshObject.H"
|
||||
#include "fvMesh.H"
|
||||
#include "dictionary.H"
|
||||
#include "fvMatricesFwd.H"
|
||||
@ -56,7 +55,7 @@ namespace Foam
|
||||
|
||||
class porosityModel
|
||||
:
|
||||
public MeshObject<fvMesh, UpdateableMeshObject, porosityModel>
|
||||
public regIOobject
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
@ -109,8 +109,6 @@ Foam::treeDataEdge::findIntersectOp::findIntersectOp
|
||||
(
|
||||
const indexedOctree<treeDataEdge>& tree
|
||||
)
|
||||
:
|
||||
tree_(tree)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -121,8 +121,6 @@ public:
|
||||
|
||||
class findIntersectOp
|
||||
{
|
||||
const indexedOctree<treeDataEdge>& tree_;
|
||||
|
||||
public:
|
||||
|
||||
findIntersectOp(const indexedOctree<treeDataEdge>& tree);
|
||||
|
||||
@ -70,8 +70,6 @@ Foam::treeDataPoint::findIntersectOp::findIntersectOp
|
||||
(
|
||||
const indexedOctree<treeDataPoint>& tree
|
||||
)
|
||||
:
|
||||
tree_(tree)
|
||||
{}
|
||||
|
||||
|
||||
|
||||
@ -104,8 +104,6 @@ public:
|
||||
|
||||
class findIntersectOp
|
||||
{
|
||||
const indexedOctree<treeDataPoint>& tree_;
|
||||
|
||||
public:
|
||||
|
||||
findIntersectOp(const indexedOctree<treeDataPoint>& tree);
|
||||
|
||||
@ -76,7 +76,7 @@ tmp<volVectorField> laminar::Us() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ".Us",
|
||||
typeName + ":Us",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
@ -104,7 +104,7 @@ tmp<volScalarField> laminar::mut() const
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
typeName + ".mut",
|
||||
typeName + ":mut",
|
||||
owner_.regionMesh().time().timeName(),
|
||||
owner_.regionMesh(),
|
||||
IOobject::NO_READ,
|
||||
|
||||
@ -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-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -26,8 +26,6 @@ License
|
||||
#include "standardPhaseChange.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "thermoSingleLayer.H"
|
||||
#include "specie.H"
|
||||
#include "heatTransferModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(epsilonPatches, i)
|
||||
{
|
||||
label patchI = epsilonPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -237,9 +237,9 @@ void epsilonWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar w = cornerWeights[faceI];
|
||||
|
||||
epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
|
||||
epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]);
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(mutw[faceI] + muw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& epsilonf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
|
||||
epsilonf[faceI] = epsilon[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(omegaPatches, i)
|
||||
{
|
||||
label patchI = omegaPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -244,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
|
||||
|
||||
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(mutw[faceI] + muw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -481,6 +481,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& omegaf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -492,6 +494,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
|
||||
omegaf[faceI] = omega[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(epsilonPatches, i)
|
||||
{
|
||||
label patchI = epsilonPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& epsilonf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI];
|
||||
epsilonf[faceI] = epsilon[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights()
|
||||
forAll(omegaPatches, i)
|
||||
{
|
||||
label patchI = omegaPatches[i];
|
||||
const fvPatchField& wf = weights.boundaryField()[patchI];
|
||||
const fvPatchScalarField& wf = weights.boundaryField()[patchI];
|
||||
cornerWeights_[patchI] = 1.0/wf.patchInternalField();
|
||||
}
|
||||
|
||||
@ -242,9 +242,9 @@ void omegaWallFunctionFvPatchScalarField::calculate
|
||||
|
||||
scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]);
|
||||
|
||||
omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog));
|
||||
|
||||
G[cellI] =
|
||||
G[cellI] +=
|
||||
w
|
||||
*(nutw[faceI] + nuw[faceI])
|
||||
*magGradUw[faceI]
|
||||
@ -479,6 +479,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
FieldType& omega = const_cast<FieldType&>(dimensionedInternalField());
|
||||
|
||||
scalarField& omegaf = *this;
|
||||
|
||||
// only set the values if the weights are < 1 - tolerance
|
||||
forAll(weights, faceI)
|
||||
{
|
||||
@ -490,6 +492,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs
|
||||
|
||||
G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI];
|
||||
omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI];
|
||||
omegaf[faceI] = omega[cellI];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
51
wmake/wmake
51
wmake/wmake
@ -50,6 +50,7 @@ The 'target' is a Makefile target:
|
||||
e.g., Make/linux64GccDPOpt/fvMesh.o
|
||||
|
||||
or a special target:
|
||||
dwim search up directories tree for Make sub-directory and build
|
||||
all all subdirectories, uses any Allwmake files if they exist
|
||||
exe build statically linked executable
|
||||
lib build statically linked archive lib (.a)
|
||||
@ -136,7 +137,7 @@ fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# check arguments and change to the directory in which to run wmake
|
||||
# Check arguments and change to the directory in which to run wmake
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset dir makeType
|
||||
@ -167,6 +168,51 @@ then
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Search up directories tree for the Make sub-directory and build there
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
unset dir
|
||||
MakeDir=Make
|
||||
|
||||
expandpath()
|
||||
{
|
||||
dir=`dirname $1`
|
||||
cwd=$PWD
|
||||
cd $dir
|
||||
exPath=$PWD
|
||||
cd $cwd
|
||||
}
|
||||
|
||||
find_target()
|
||||
{
|
||||
expandpath $1
|
||||
|
||||
if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then
|
||||
echo "$Script error: could not find Make directory"
|
||||
elif [ -d "$1/Make" ]; then
|
||||
echo Target $1
|
||||
dir=$1
|
||||
else
|
||||
find_target "$1/.."
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$makeType" = dwim ]
|
||||
then
|
||||
find_target .
|
||||
makeType=
|
||||
|
||||
if [ "$dir" ]
|
||||
then
|
||||
cd $dir 2>/dev/null || {
|
||||
echo "$Script error: could not change to directory '$dir'" 1>&2
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Recurse the application directories tree
|
||||
#------------------------------------------------------------------------------
|
||||
@ -254,8 +300,9 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc
|
||||
rc=$?
|
||||
[ $rc -eq 0 ] || exit $rc
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# make the object files and link
|
||||
# Make the object files and link
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType"
|
||||
|
||||
Reference in New Issue
Block a user