Commit fa430cc4 authored by mattijs's avatar mattijs
Browse files

Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop

parents 8c08ad66 ba6ae13b
......@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"cloud",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
......
......@@ -11,7 +11,7 @@ word continuousPhaseName
mesh,
IOobject::MUST_READ
)
).lookup("continuousPhaseName")
).lookup("continuousPhase")
);
Info<< "Reading field U\n" << endl;
......@@ -123,7 +123,7 @@ volScalarField alphac
);
word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName);
args.optionReadIfPresent("cloud", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicTypeCloud kinematicCloud
......
......@@ -58,7 +58,7 @@ volScalarField mu
);
word kinematicCloudName("kinematicCloud");
args.optionReadIfPresent("cloudName", kinematicCloudName);
args.optionReadIfPresent("cloud", kinematicCloudName);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
basicKinematicCollidingCloud kinematicCloud
......
......@@ -47,7 +47,7 @@ int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"cloud",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
......
......@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"cloud",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
......
......@@ -51,7 +51,7 @@ autoPtr<compressible::turbulenceModel> turbulence
const word kinematicCloudName
(
args.optionLookupOrDefault<word>("cloudName", "kinematicCloud")
args.optionLookupOrDefault<word>("cloud", "kinematicCloud")
);
Info<< "Constructing kinematicCloud " << kinematicCloudName << endl;
......
......@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
{
argList::addOption
(
"cloudName",
"cloud",
"name",
"specify alternative cloud name. default is 'kinematicCloud'"
);
......
......@@ -126,35 +126,35 @@
{
surfaceScalarField phir(phic*mixture.nHatf());
tmp<surfaceScalarField> talphaPhiUn
(
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux
alphaPhiUn =
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
);
fvc::flux
(
phi,
alpha1,
alphaScheme
)
+ fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha1,
alpharScheme
)
);
// Calculate the Crank-Nicolson off-centred alpha flux
if (ocCoeff > 0)
{
talphaPhiUn =
cnCoeff*talphaPhiUn + (1.0 - cnCoeff)*alphaPhi.oldTime();
alphaPhiUn =
cnCoeff*alphaPhiUn + (1.0 - cnCoeff)*alphaPhi.oldTime();
}
if (MULESCorr)
{
tmp<surfaceScalarField> talphaPhiCorr(talphaPhiUn() - alphaPhi);
tmp<surfaceScalarField> talphaPhiCorr(alphaPhiUn - alphaPhi);
volScalarField alpha10("alpha10", alpha1);
MULES::correct(alpha1, talphaPhiUn(), talphaPhiCorr.ref(), 1, 0);
MULES::correct(alpha1, alphaPhiUn, talphaPhiCorr.ref(), 1, 0);
// Under-relax the correction for all but the 1st corrector
if (aCorr == 0)
......@@ -169,7 +169,7 @@
}
else
{
alphaPhi = talphaPhiUn;
alphaPhi = alphaPhiUn;
MULES::explicitSolve(alpha1, phiCN, alphaPhi, 1, 0);
}
......
......@@ -135,6 +135,21 @@ surfaceScalarField alphaPhi
phi*fvc::interpolate(alpha1)
);
// MULES compressed flux is registered in case scalarTransport FO needs it.
surfaceScalarField alphaPhiUn
(
IOobject
(
"alphaPhiUn",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", phi.dimensions(), 0.0)
);
// MULES Correction
tmp<surfaceScalarField> talphaPhiCorr0;
......
......@@ -49,7 +49,7 @@ Foam::copiedFixedValueFvPatchScalarField::copiedFixedValueFvPatchScalarField
)
:
fixedValueFvPatchScalarField(p, iF, dict),
sourceFieldName_(dict.lookup("sourceFieldName"))
sourceFieldName_(dict.lookup("sourceField"))
{}
......@@ -109,7 +109,7 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
{
fvPatchField<scalar>::write(os);
os.writeKeyword("sourceFieldName")
os.writeKeyword("sourceField")
<< sourceFieldName_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
......
......@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
#include "createMesh.H"
const Switch inflate(args.args()[1]);
const Switch inflate(args[1]);
if (inflate)
{
......
......@@ -66,7 +66,7 @@ int main(int argc, char *argv[])
const pointConstraints& pc = pointConstraints::New(pointMesh::New(mesh));
const Switch inflate(args.args()[1]);
const Switch inflate(args[1]);
if (inflate)
{
......
......@@ -36,7 +36,7 @@ Description
int main(int argc, char *argv[])
{
argList::validArgs.append("cloudName");
argList::validArgs.append("cloud");
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
......
......@@ -602,8 +602,8 @@ int main(int argc, char *argv[])
const word& key = iter().keyword();
const dictionary& dict = iter().dict();
const word cyclicName = dict.lookup("cyclicMasterPatchName");
const word wallName = dict.lookup("wallPatchName");
const word cyclicName = dict.lookup("cyclicMasterPatch");
const word wallName = dict.lookup("wallPatch");
FixedList<word, 3> nameAndType;
nameAndType[0] = key;
nameAndType[1] = wallName;
......
......@@ -72,7 +72,7 @@ int main(int argc, char *argv[])
#include "createNamedMesh.H"
const word oldInstance = mesh.pointsInstance();
word cellSetName(args.args()[1]);
word cellSetName(args[1]);
const bool overwrite = args.optionFound("overwrite");
const bool minSet = args.optionFound("minSet");
......
......@@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#include "createTime.H"
std::ifstream plot3dFile(args.args()[1].c_str());
std::ifstream plot3dFile(args[1].c_str());
string line;
std::getline(plot3dFile, line);
......
......@@ -811,7 +811,7 @@ int main(int argc, char *argv[])
args.optionReadIfPresent("ignoreCellGroups", ignoreCellGroups);
args.optionReadIfPresent("ignoreFaceGroups", ignoreFaceGroups);
cubitFile = args.options().found("cubit");
cubitFile = args.optionFound("cubit");
if (cubitFile)
{
......
......@@ -128,16 +128,12 @@ int main(int argc, char *argv[])
fileName dictPath;
// Check if the dictionary is specified on the command-line
if (args.optionFound("dict"))
if (args.optionReadIfPresent("dict", dictPath))
{
dictPath = args["dict"];
dictPath =
(
isDir(dictPath)
? dictPath/dictName
: dictPath
);
if (isDir(dictPath))
{
dictPath = dictPath / dictName;
}
}
// Check if dictionary is present in the constant directory
else if
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -67,14 +67,7 @@ int main(int argc, char *argv[])
// Allow override of decomposeParDict location
fileName decompDictFile;
if (args.optionReadIfPresent("decomposeParDict", decompDictFile))
{
if (isDir(decompDictFile))
{
decompDictFile = decompDictFile / "decomposeParDict";
}
}
args.optionReadIfPresent("decomposeParDict", decompDictFile);
IOdictionary foamyHexMeshDict
(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment