Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-8
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Knir committed Oct 4, 2020
2 parents 6f36692 + 6e60495 commit 08ff016
Show file tree
Hide file tree
Showing 46 changed files with 379 additions and 292 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**.C linguist-language=C++
**.H linguist-language=C++
**.L linguist-language=Lex
7 changes: 1 addition & 6 deletions applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ surfaceScalarField phiHbyA

MRF.makeRelative(fvc::interpolate(rho), phiHbyA);

bool adjustMass = pimple.transonic() ? false : adjustPhi(phiHbyA, U, p_rgh);
bool adjustMass = mesh.steady() && adjustPhi(phiHbyA, U, p_rgh);

surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());

Expand Down Expand Up @@ -74,11 +74,6 @@ if (pimple.transonic())
}
else
{
if (mesh.steady())
{
adjustMass = adjustPhi(phiHbyA, U, p_rgh);
}

fvScalarMatrix p_rghDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
Expand Down
2 changes: 1 addition & 1 deletion applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ surfaceScalarField phiHbyA

MRF.makeRelative(fvc::interpolate(rho), phiHbyA);

bool closedVolume = simple.transonic() ? false : adjustPhi(phiHbyA, U, p_rgh);
bool closedVolume = adjustPhi(phiHbyA, U, p_rgh);

surfaceScalarField phig(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());

Expand Down
13 changes: 4 additions & 9 deletions etc/caseDicts/annotated/surfaceSubsetDict
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,10 @@ surface
plane
{
planeType embeddedPoints;
embeddedPointsDict
{
// point1 (-937.259845440205 160.865349115986 240.738791238078);
// point2 (-934.767379895778 9.63875523747379 14.412359671298);
// point3 (44.4744688899417 121.852927962709 182.352485273106);
point1 (-957.895294591874 242.865936478961 162.286611511875);
point2 (-961.43140327772 4.53895551562943 3.04159982093444);
point3 (91.2414146173805 72.1504381996692 48.2181961945329);
}

point1 (-957.895294591874 242.865936478961 162.286611511875);
point2 (-961.43140327772 4.53895551562943 3.04159982093444);
point3 (91.2414146173805 72.1504381996692 48.2181961945329);

// Distance from plane
distance 0.1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type fieldValueDelta;
libs ("libfieldFunctionObjects.so");

writeControl timeStep;
writeInterval 1
writeInterval 1;

operation subtract;

Expand Down
13 changes: 4 additions & 9 deletions etc/caseDicts/postProcessing/visualization/surfaces
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,15 @@ surfaces
yNormal
{
$cuttingPlane;
pointAndNormalDict
{
normalVector $y; // Overrides default normalVector (1 0 0)
} // $y: macro for (0 1 0)
normalVector $y; // Overrides default normalVector (1 0 0)
// $y: macro for (0 1 0)
}

zNormal
{
$cuttingPlane;
pointAndNormalDict
{
basePoint (0 0 2); // Overrides default basePoint (0 0 0)
normalVector $z; // $z: macro for (0 0 1)
}
basePoint (0 0 2); // Overrides default basePoint (0 0 0)
normalVector $z; // $z: macro for (0 0 1)
}

p100
Expand Down
7 changes: 2 additions & 5 deletions etc/caseDicts/postProcessing/visualization/surfaces.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ cuttingPlane
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
basePoint $origin;
normalVector $x;
}
point $origin;
normal $x;
interpolate true;
}

Expand Down
4 changes: 2 additions & 2 deletions etc/templates/axisymmetricJet/constant/momentumTransport
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
4 changes: 2 additions & 2 deletions etc/templates/closedVolume/constant/momentumTransport
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kEpsilon;
model kEpsilon;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
4 changes: 2 additions & 2 deletions etc/templates/closedVolumeRotating/constant/momentumTransport
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kEpsilon;
model kEpsilon;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
4 changes: 2 additions & 2 deletions etc/templates/inflowOutflow/constant/momentumTransport
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ simulationType RAS;

RAS
{
RASModel kOmegaSST;
model kOmegaSST;

turbulence on;
printCoeffs on;
}

LES
{
LESModel SpalartAllmarasDDES;
model SpalartAllmarasDDES;
delta cubeRootVol;

turbulence on;
Expand Down
14 changes: 9 additions & 5 deletions src/OpenFOAM/db/dynamicLibrary/codedBase/CodedBase.C
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,17 @@ void Foam::CodedBase<CodedType>::writeCode(Ostream& os) const
{
writeEntry(os, "name", codeName_);

forAll(codeKeys_, i)
wordList codeAndBuildKeys(codeKeys_);
codeAndBuildKeys.append("codeOptions");
codeAndBuildKeys.append("codeLibs");

forAll(codeAndBuildKeys, i)
{
if (dict_.found(codeKeys_[i]))
if (dict_.found(codeAndBuildKeys[i]))
{
writeKeyword(os, codeKeys_[i]);
os.write(verbatimString(dict_[codeKeys_[i]]))
<< token::END_STATEMENT << nl;
writeKeyword(os, codeAndBuildKeys[i]);
os.write(verbatimString(dict_[codeAndBuildKeys[i]]))
<< token::END_STATEMENT << nl;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/OpenFOAM/meshes/primitiveShapes/plane/plane.C
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -160,7 +160,7 @@ Foam::plane::plane(const dictionary& dict)

if (planeType == "planeEquation")
{
const dictionary& subDict = dict.subDict("planeEquationDict");
const dictionary& subDict = dict.optionalSubDict("planeEquationDict");
scalarList C(4);

C[0] = subDict.lookup<scalar>("a");
Expand All @@ -173,7 +173,7 @@ Foam::plane::plane(const dictionary& dict)
}
else if (planeType == "embeddedPoints")
{
const dictionary& subDict = dict.subDict("embeddedPointsDict");
const dictionary& subDict = dict.optionalSubDict("embeddedPointsDict");

point point1(subDict.lookup("point1"));
point point2(subDict.lookup("point2"));
Expand All @@ -183,7 +183,7 @@ Foam::plane::plane(const dictionary& dict)
}
else if (planeType == "pointAndNormal")
{
const dictionary& subDict = dict.subDict("pointAndNormalDict");
const dictionary& subDict = dict.optionalSubDict("pointAndNormalDict");

point_ =
subDict.found("basePoint")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Usage
\verbatim
<masterPatchName>
{
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
type compressible::thermalBaffle1D<eConstSolidThermoPhysics>;
samplePatch <slavePatchName>;
thickness uniform 0.005; // thickness [m]
Expand All @@ -60,23 +61,26 @@ Usage
thermodynamics
{
Hf 0;
Cp 10;
Cv 10;
}
equationOfState
{
rho 10;
}
value uniform 300;
value uniform 300;
}
<slavePatchName>
{
type compressible::thermalBaffle1D<hConstSolidThermoPhysics>;
type compressible::thermalBaffle1D<eConstSolidThermoPhysics>;
samplePatch <masterPatchName>;
qr none;
relaxation 1;
value uniform 300;
}
\endverbatim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2018-2020 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
Expand Down Expand Up @@ -101,37 +101,25 @@ bool Foam::pimpleControl::run(Time& time)
{
read();

time.run();

if (!endIfConverged(time))
{
storePrevIterFields();
}

return time.running();
return time.run();
}


bool Foam::pimpleControl::loop(Time& time)
{
read();

time.run();

if (!endIfConverged(time))
{
storePrevIterFields();
}

if (time.running())
{
time ++;
return true;
}
else
{
return false;
}
return time.loop();
}


Expand Down
Loading

0 comments on commit 08ff016

Please sign in to comment.