Commit 017213de authored by sergio's avatar sergio
Browse files

Merge branch 'develop-pre-release' of...

Merge branch 'develop-pre-release' of develop.openfoam.com:Development/OpenFOAM-plus into develop-pre-release
parents 649149f9 f15be4d0
......@@ -55,6 +55,13 @@ int main(int argc, char *argv[])
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
label ntot = 1;
forAll(K.nn(), idim)
{
ntot *= K.nn()[idim];
}
const scalar recRootN = 1.0/Foam::sqrt(scalar(ntot));
Info<< nl << "Starting time loop" << endl;
while (runTime.loop())
......
......@@ -20,9 +20,3 @@
Kmesh K(mesh);
UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties);
label ntot = 1;
forAll(K.nn(), idim)
{
ntot *= K.nn()[idim];
}
const scalar recRootN = 1.0/Foam::sqrt(scalar(ntot));
......@@ -102,28 +102,6 @@ forAll(Y, i)
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
bool solvePrimaryRegion
(
additionalControlsDict.lookupOrDefault("solvePrimaryRegion", true)
);
bool solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault("solvePyrolysisRegion", true)
);
volScalarField Qdot
(
IOobject
......
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
bool solvePrimaryRegion
(
additionalControlsDict.lookupOrDefault("solvePrimaryRegion", true)
);
bool solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault("solvePyrolysisRegion", true)
);
scalar maxDi = pyrolysis.maxDiff();
......@@ -63,7 +63,7 @@ int main(int argc, char *argv[])
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "readPyrolysisTimeControls.H"
#include "createRegionControls.H"
turbulence->validate();
......
......@@ -44,4 +44,3 @@ autoPtr<incompressible::turbulenceModel> turbulence
#include "createMRF.H"
#include "createOversetFields.H"
......@@ -87,6 +87,7 @@ int main(int argc, char *argv[])
#include "createUpdatedDynamicFvMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createOversetFields.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
......
IOporosityModelList pZones(mesh);
bool pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
if (pZones.active())
{
// nUCorrectors for pressureImplicitPorosity
nUCorr = simple.dict().lookupOrDefault<int>("nUCorrectors", 0);
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
Info<< "Using pressure implicit porosity" << endl;
}
else
{
Info<< "Using pressure explicit porosity" << endl;
}
}
......@@ -55,6 +55,7 @@ int main(int argc, char *argv[])
#include "createControl.H"
#include "createFields.H"
#include "createPorousZones.H"
#include "setPorosityTreatment.H"
#include "initContinuityErrs.H"
turbulence->validate();
......
bool pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
if (pZones.active())
{
// nUCorrectors for pressureImplicitPorosity
nUCorr = simple.dict().lookupOrDefault<int>("nUCorrectors", 0);
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
Info<< "Using pressure implicit porosity" << endl;
}
else
{
Info<< "Using pressure explicit porosity" << endl;
}
}
......@@ -103,11 +103,6 @@ forAll(Y, i)
}
fields.add(thermo.he());
bool solvePrimaryRegion
(
pimple.dict().lookupOrDefault("solvePrimaryRegion", true)
);
volScalarField Qdot
(
IOobject
......
bool solvePrimaryRegion
(
pimple.dict().lookupOrDefault("solvePrimaryRegion", true)
);
......@@ -61,6 +61,7 @@ int main(int argc, char *argv[])
#include "createTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRegionControls.H"
#include "initContinuityErrs.H"
turbulence->validate();
......
......@@ -65,8 +65,14 @@
phic += (mixture.cAlpha()*icAlpha)*fvc::interpolate(mag(U));
}
surfaceScalarField::Boundary& phicBf =
phic.boundaryFieldRef();
// Add the optional shear compression contribution
if (scAlpha > 0)
{
phic +=
scAlpha*mag(mesh.delta() & fvc::interpolate(symm(fvc::grad(U))));
}
surfaceScalarField::Boundary& phicBf = phic.boundaryFieldRef();
// Do not compress interface at non-coupled boundary faces
// (inlets, outlets etc.)
......
Test-coordinateSystem.C
EXE = $(FOAM_USER_APPBIN)/Test-coordinateSystem
EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lmeshTools
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -21,14 +21,88 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
readPyrolysisTimeControls
Application
Test-coordinateSystem
Description
Expand coordinate system definitions
\*---------------------------------------------------------------------------*/
scalar maxDi = pyrolysis.maxDiff();
#include "argList.H"
#include "coordinateSystem.H"
#include "Fstream.H"
#include "IOstreams.H"
using namespace Foam;
void doTest(const dictionary& dict)
{
Info<< dict.dictName() << dict << nl;
// Could fail?
const bool throwingIOError = FatalIOError.throwExceptions();
const bool throwingError = FatalError.throwExceptions();
try
{
coordinateSystem cs1(dict.dictName(), dict);
coordinateSystem cs2;
// Move assign
cs2 = std::move(cs1);
// Info<<cs2 << nl;
cs2.writeDict(Info, true);
Info<< nl;
}
catch (Foam::IOerror& err)
{
Info<< "Caught FatalIOError " << err << nl << endl;
}
catch (Foam::error& err)
{
Info<< "Caught FatalError " << err << nl << endl;
}
FatalError.throwExceptions(throwingError);
FatalIOError.throwExceptions(throwingIOError);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Main program:
int main(int argc, char *argv[])
{
argList::noParallel();
argList::addArgument("dict .. dictN");
argList args(argc, argv, false, true);
if (args.size() <= 1)
{
Info<<"no coordinateSystem dictionaries to expand" << nl;
}
else
{
for (label argi=1; argi < args.size(); ++argi)
{
const string& dictFile = args[argi];
IFstream is(dictFile);
dictionary inputDict(is);
forAllConstIters(inputDict, iter)
{
if (iter().isDict())
{
doTest(iter().dict());
}
}
}
}
return 0;
}
// ************************************************************************* //
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object testDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Rotate 90 deg around x: y -> z, z -> -y
rot_x90_axesRotation
{
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (1 0 0);
e3 (0 -1 0);
}
}
rot_x90_euler
{
origin (0 0 0);
coordinateRotation
{
type EulerRotation;
rotation (0 90 0); // z-x'-z''
}
}
// Rotate 45 deg around z: x -> (1 1 0), y = (-1 1 0)
rot_z45_axesRotation
{
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (1 1 0);
e3 (0 0 1);
}
}
rot_z45_euler
{
origin (0 0 0);
coordinateRotation
{
type EulerRotation;
rotation (45 0 0); // z-x'-z''
}
}
// Rotate -45 deg around z: x -> (1 -1 0), y = (1 1 0)
rot_zm45_axesRotation
{
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (1 -1 0);
e3 (0 0 1);
}
}
rot_zm45_euler
{
origin (0 0 0);
coordinateRotation
{
type EulerRotation;
rotation (-45 0 0); // z-x'-z''
}
}
// Null transforms
null_axesRotation
{
origin (0 0 0);
coordinateRotation
{
type axesRotation;
e1 (1 0 0);
e3 (0 0 1);
}
}
null_euler
{
origin (0 0 0);
coordinateRotation
{
type EulerRotation;
rotation (0 0 0); // z-x'-z''
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -43,7 +43,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
setenv ParaView_VERSION 5.5.1
setenv ParaView_VERSION 5.5.2
set ParaView_QT=qt-system
set cmake_version=cmake-system
......
......@@ -46,7 +46,7 @@
#------------------------------------------------------------------------------
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
ParaView_VERSION=5.5.1
ParaView_VERSION=5.5.2
ParaView_QT=qt-system
cmake_version=cmake-system
......
Markdown is supported
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