Compare commits

..

66 Commits

Author SHA1 Message Date
874426562a BUG: incorrect startLineNumber for primitiveEntry (fixes #1706) 2020-05-14 17:18:00 +02:00
e0145b8555 BUG: Pair sort on construct did the opposite (fixes #1701) 2020-05-11 20:26:42 +02:00
9abf648acf CONFIG: provide separate default settings for clang/gcc (fixes #1566)
- the foamConfigurePaths script is quite simplistic and aggressive in
  what it changes. This was particularly evident when using it to
  change gcc/clang versions.

  Restructured the corresponding compiler settings to define default
  versions (eg, "default_gcc_version") that limits the scope of
  changes performed by foamConfigurePaths and makes it easier to
  understand if changing manually.
2020-02-03 11:05:04 +01:00
3fdc623901 CONFIG: bump patch level 2020-01-31 12:10:51 +01:00
3050636576 COMP: avoid -Wstringop-truncation warning 2020-01-31 12:08:31 +01:00
2e11ffc335 COMP: backport of updates for gcc-92 compilation
ENH: add typedefs for interpolation tables
2020-01-28 12:46:27 +01:00
6387af94b3 BUG: incorrect Nastran surface output and segmentation faults #1571
- indexing error in the output of values resulted in uniform output in
  most cases.

- allocation error for on-the-fly triangulation

ENH: changed decomposed storage from DynamicList to plain faceList for
clearer allocation control and better overhead
2020-01-27 11:04:25 +01:00
bdc3d457a7 COMP: silence gcc 8.2 memcpy warnings
- we know they have already protected by an is_contiguous check,
  so the class-memaccess warning/error can be suppressed.
2019-10-28 16:57:47 +01:00
79f96c0af5 CONFIG: adjust known gcc/clang compiler versions 2019-10-28 12:55:15 +01:00
a7fb5e6040 STYLE: use const reference for caught exceptions
BUG: PackedList return value from void method

BUG: non-const access to Reaction name
2019-01-23 09:03:06 +01:00
f24610ed95 CONFIG: reset maintenance version as v1712 2019-08-01 09:00:00 +02:00
8868b8da98 CONFIG: backport of META-INFO information (#1367) 2019-07-10 20:19:01 +02:00
daf4ba3139 BUG: Sf field ignored for sumDirection operation (fixes #1287) 2019-04-16 18:32:07 +02:00
be0f24ab3c COMP: fix conditional for VTK legacy rendering.
- was deprecated for removal with VTK 8.1.0
  definitely removed in VTK 8.2.0
2018-11-08 21:28:26 +01:00
cecdb88113 ENH: export FOAM_API in dictionary (issue #1158)
- uses the value of the OPENFOAM (OPENFOAM_PLUS) compiler define
2019-01-07 19:04:50 +01:00
d761374974 CONFIG: cannot pass additional arguments to foamEtcFile (closes #880)
- add support by using updated foamEtcFile from 1806, which also add
  the '-config' short-cut option.
2018-06-18 08:42:55 +02:00
1f0bc69223 BUG: dictionary lookup of embedded coordinateSystem fails (fixes #879)
- also fix incorrect documentation in forces functionObject and
  interRegionExplicitPorositySource fvOption.
2018-06-16 00:29:41 +02:00
854b5cec1e BUG: rigidBodyMotionState: not readable in binary. Fixes #871. 2018-06-13 14:55:20 +01:00
f7f29259f1 ENH: Updated example usage in header. Fixes #859 2018-06-13 14:11:51 +01:00
528d8a7e11 BUG: fftw: missing normalisation. See #867. 2018-06-13 14:09:37 +01:00
f0806d5d7c BUG: non-uniform distribution for Random::position<label> (closes #865)
- use floor/truncate instead of round. Backport of changes in the
  develop-pre-release branch.
2018-06-13 12:38:13 +02:00
9edc017a1e COMP: Added include file to enable derived code extensions 2018-06-13 10:52:08 +01:00
a9f92d4c90 BUG: decomposeParDict: ignores mesh region. Fixes #848. 2018-05-29 10:26:22 +01:00
5abff4c68e BUG: Corrected ConeNozzleInjection injected posisions in parallel operation. See #840 2018-05-30 14:05:53 +01:00
e00e7f82e0 BUG: Corrected header documentation - see #831 2018-05-29 15:28:44 +01:00
b6956f062a BUG: COxidationIntrinicRate - corrected eta. See #842 2018-05-29 15:10:19 +01:00
e9e4e11474 TUT: Updated input value 2018-05-18 09:57:12 +01:00
2084a43c4d BUG: ConeInjection - corrected number of parcels injected for multiple injector positions 2018-05-17 09:04:00 +01:00
381e96e509 BUG: wrong sizing index for VTK legacy polyhedrals (closes #829) 2018-05-16 15:57:49 +01:00
cdc4b90f76 BUG: compiler-specific INTELMPI not always found (closes #830)
- tie the MPI rules to the base compiler type *without* its version.
  Eg, linux64Gcc (which exists) instead of linux64Gcc81
2018-05-16 12:36:29 +01:00
ea2eb91f8c COMP: incorrect executable path sphereSurfactantFoam (closes #695) 2018-01-08 10:51:00 +01:00
2c76ae206e BUG: regionToCell: incorrect indexing of remote values. Fixes #818. 2018-05-02 10:55:47 +01:00
bcdb61bd45 BUG: wrong nanoseconds in highResLastModified (closes #794)
- was using st_atim instead of st_mtim for the nanoseconds

- value of followLink was being ignored (it was always being followed).
2018-04-11 10:27:41 +02:00
949e4d8cce BUG: mesh refinement crash with degenerate mesh distributions (closes #778)
- occurred when the initial mesh distribution was missing cells on
  some processors.
2018-03-21 21:54:40 +01:00
eb443647b0 BUG: corrected 'binned' distribution model 2018-03-20 10:17:33 +00:00
8322e6308f BUG: IsoAdvector - updated use of pos/neg as reported by Johan Roenby. See #775 2018-03-19 13:56:32 +00:00
209c8ccb64 BUG: Corrections to externalWallHeatFluxTemperature BC (ref EP624) 2018-03-14 15:34:53 +00:00
ec169b1eba BUG: surface proxy zone handling with dangling? reference (closes #757)
- using const reference to temporary was failing.  Remedy by using a
  direct copy, which is a reasonable solution since surfZone content
  is quite minimal.
2018-03-13 17:58:02 +01:00
08bf1c8fc5 ENH: Adding thermo using polynomial transport, JANAF and ideal gas.
This thermo is used with multiComponentMixture in rhoThermo type
2018-04-06 08:46:17 -07:00
726d478656 ENH: DPMFoam - extended RAS model selection. See #743 2018-03-13 12:48:16 +00:00
2a7555b565 TUT: Corrected turbulence Ck value - see #753 2018-03-13 12:32:16 +00:00
9bb236119c BUG: removed incorrect code from cyclicFaPatch referring to cyclicPolyPatch. See #761 2018-03-13 08:54:39 +00:00
1b892e5b32 TUT: Removed misleading comment in tutorial - see #746 2018-03-06 11:12:39 +00:00
19872f73f5 COMP: add -fpermissive to c++LESSWARN flags (closes #744)
- downgrades some diagnostics about nonconformant code from errors to
  warnings. Oddly enough, the errors actually arise from STL library
  elements shipped with gcc itself. Affects kahip compilation with
  gcc-6, gcc-7
2018-02-28 14:31:48 +01:00
418f40bf0a BUG: faceOnlySet sampling does not stop at 'end' (closes #745) 2018-02-28 11:23:59 +01:00
c67624cc75 GIT: merge artifact duplicate call to update mesh moving 2018-02-28 10:59:53 +01:00
34a776954c BUG: isoAdvection using 'vof2IsoTol' instead of 'isoFaceTol' (closes #740) 2018-02-23 15:11:24 +01:00
956014ef1a ENH: lagrangian injection - exposed minimum number of particles per parcel. See #728
The minimum number of particles per parcel can now be set in the
injection model input, e.g.:

    model1
    {
        type            ...;
        massTotal       ...;
        parcelBasisType ...;
        minParticlesPerParcel 1; <-- new optional entry
        SOI             ...;
        ...

Uses a value of 1 by default if the entry is not present.  The value of
1 is generally recommended and beneficial for coupled cases where small
time steps can lead to the injection of too many parcels and subsequently
greatly over-predict the particle source contributions (momentum, heat,
mass transfer etc)
2018-02-23 12:00:14 +00:00
eb7f123baa BUG: simpleCoalParcelFoam - corrected dimensions of Qdot. Fixes #742 2018-02-23 09:04:16 +00:00
1bd7b85581 ENH: Updating the header documentation for fanFvPatchField 2018-01-25 10:04:30 -08:00
0ac75a2015 ENH: Changing fanFvPatchField operation for non-dimensional mode.
The non-dimensional table takes non-dimensional U as entry, not flow rate
2018-01-25 08:46:48 -08:00
7156efc3c9 GIT: corrected incorrect merge artefacts 2018-01-25 11:12:42 +00:00
eb5a9fffb8 BUG: timeControlFunctionObject swallows dictionary modifications (closes #716)
- runTimeModifiable change to the dictionary not being propagated to
  the underlying functionObjects
2018-01-24 20:45:59 +01:00
137bfedc16 BUG: problems converting clouds to ensight or vtk format (closes #708)
- problems when the cloud was not available on all processors.

- NB: ensight measured data only allows a single cloud, but
  foamToEnsight writes all clouds.
2018-01-23 15:39:45 +01:00
d4bd01c489 BUG: noiseModel - added missing read of 'writePSDf' entry 2018-01-19 12:48:59 +00:00
c51cf4ae27 ENH: kOmegaSSTLM improved robustness 2018-01-18 12:09:06 +00:00
710a717c67 ENH: sixDoFRigidBodyState relocated and code improvements. Fixes #711 2018-01-18 09:26:22 +00:00
55182e74ee TUT: Updated Allrun scripts for tests. Fixes #710 2018-01-17 15:30:49 +00:00
218ca2f786 ENH: use main constant/triSurface directory for sampling surfaces (closes #704)
- these were previously taken from region-local directories
  (eg, constant/region/triSurface), but this becomes difficult to
  manage when there are many files and regions.
2018-01-17 14:47:38 +01:00
3fc9267650 BUG: reconstructPar ignores writeLagrangianPositions (fixes #702)
- The central InfoSwitch "writeLagrangianPositions" allows writing an
  additional Lagrangian "positions" file, but these were not being
  written by reconstructPar. These are now also written in reconstructPar
  if the central writeLagrangianPositions InfoSwitch is enabled.

NOTES

- "positions" are reconstructed from the processors "coordinates" file

- decomposePar will not attempt to create or redistribute any
  "positions" files
2018-01-17 13:38:24 +01:00
433288a908 DOC: Documentation updates 2018-01-11 14:32:39 +00:00
91079cddd8 ENH: interIsoFoam - added linkage against wave modelling library 2018-01-11 14:30:26 +00:00
bb52f239d4 COMP: mpi: const_cast because of incorrect mpi.h header. Fixes #697. 2018-01-10 09:10:30 +00:00
40bb7a5f6d SUBMODULE: cfmesh update for 64-bit labels 2018-01-08 14:50:52 +01:00
ecb29bc8f5 ENH: nutUBlended wall function - added protection for uTau. See #696 2018-01-08 10:33:56 +00:00
8e2ac04461 ENH: Updates to the k-omega SST decay control functionality - see #694 2018-01-05 14:15:32 +00:00
10459 changed files with 66922 additions and 220173 deletions

1
.gitignore vendored
View File

@ -4,7 +4,6 @@
# Editor and misc backup files - anywhere
*~
.*~
.*.swp
*.bak
*.bak[0-9][0-9]
\#*\#

3
.gitmodules vendored
View File

@ -4,6 +4,3 @@
[submodule "avalanche"]
path = modules/avalanche
url = https://develop.openfoam.com/Community/avalanche.git
[submodule "catalyst"]
path = modules/catalyst
url = https://develop.openfoam.com/Community/catalyst.git

View File

@ -11,6 +11,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR" 2>/dev/null || {
exit 1
}
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------

View File

@ -118,34 +118,4 @@ your `~/.spack/packages.yaml` file:
It appears that spack will otherwise ignore any paraview+qt version
and attempt to install a paraview~qt version instead.
---------------------------
Building on Darwin (Mac-OS)
---------------------------
Support for Darwin is incomplete, but has been provisioned for.
The following are typical (as of yet) unresolved issues.
* Scotch, ptscotch:
- The librt linkage is required for Linux, but not for Darwin.
Current resolution:
Edit or patch
src/parallel/decompose/ptscotchDecomp/Make/options
src/parallel/decompose/scotchDecomp/Make/options
to remove the '-lrt' library
* CGAL:
- ThirdParty CGAL will normally need to be compiled without mpfr/gmp.
This should be done manually prior to building OpenFOAM or other
ThirdParty. Eg,
cd $WM_THIRD_PARTY_DIR
./makeCGAL gmp-none mpfr-none
The erroneous references to gmp/mpfr library can be directly removed
from the wmake/rules/General/CGAL, but it is more advisable to
override them instead in the wmake/rules/darwin64Clang/CGAL file.
--

9
META-INFO/.gitignore vendored Normal file
View File

@ -0,0 +1,9 @@
# Do not track build information
build-info
# Do not track time-stamp
time-stamp
# Do not track any manifest files
Manifest.txt
manifest.txt

5
META-INFO/README.md Normal file
View File

@ -0,0 +1,5 @@
# META-INFO
Meta-information is for OpenFOAM internal use only.
(Backport from 1812)

2
META-INFO/api-info Normal file
View File

@ -0,0 +1,2 @@
api=1712
patch=200131

View File

@ -24,4 +24,4 @@ Violations of the Trademark are continuously monitored, and will be duly prosecu
- [OpenFOAM Community](http://www.openfoam.com/community/)
- [Contacting OpenCFD](http://www.openfoam.com/contact/)
Copyright 2016-2018 OpenCFD Ltd
Copyright 2016-2017 OpenCFD Ltd

View File

@ -11,6 +11,7 @@ cd ${0%/*} && wmakeCheckPwd "$WM_PROJECT_DIR/applications" 2>/dev/null || {
exit 1
}
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
#------------------------------------------------------------------------------

View File

@ -1,10 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/wmake/scripts/have_fftw
cd ${0%/*} || exit 1 # run from this directory
#------------------------------------------------------------------------------
if have_fftw
if [ -f "$FFTW_ARCH_PATH/include/fftw3.h" ] || \
[ "${FFTW_ARCH_PATH##*-}" = system -a -f "/usr/include/fftw3.h" ]
then
wmake
else

View File

@ -55,13 +55,6 @@ 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())
@ -133,7 +126,9 @@ int main(int argc, char *argv[])
);
}
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -20,3 +20,9 @@
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));

View File

@ -37,5 +37,3 @@ dimensionedScalar DT
dimArea/dimTime,
transportProperties
);
#include "createFvOptions.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,7 +59,6 @@ Description
int main(int argc, char *argv[])
{
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
@ -68,6 +67,7 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -93,7 +93,9 @@ int main(int argc, char *argv[])
#include "write.H"
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -1,3 +1,3 @@
overLaplacianDyMFoam.C
laplacianDyMFoam.C
EXE = $(FOAM_APPBIN)/overLaplacianDyMFoam

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
overLaplacianDyMFoam
laplacianFoam
Group
grpBasicSolvers
@ -96,7 +96,9 @@ int main(int argc, char *argv[])
#include "write.H"
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -13,7 +13,7 @@ volVectorField U
);
// Initialise the velocity internal field to zero
U = dimensionedVector(U.dimensions(), Zero);
U = dimensionedVector("0", U.dimensions(), Zero);
surfaceScalarField phi
(
@ -28,7 +28,7 @@ surfaceScalarField phi
fvc::flux(U)
);
if (args.found("initialiseUBCs"))
if (args.optionFound("initialiseUBCs"))
{
U.correctBoundaryConditions();
phi = fvc::flux(U);
@ -41,7 +41,7 @@ if (args.found("initialiseUBCs"))
word pName("p");
// Update name of the pressure field from the command-line option
args.readIfPresent("pName", pName);
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity
wordList pBCTypes
@ -74,7 +74,7 @@ volScalarField p
false
),
mesh,
dimensionedScalar(sqr(dimVelocity), Zero),
dimensionedScalar(pName, sqr(dimVelocity), 0),
pBCTypes
);
@ -105,7 +105,7 @@ volScalarField Phi
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(dimLength*dimVelocity, Zero),
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
);

View File

@ -1,3 +1,3 @@
overPotentialFoam.C
potentialFoam.C
EXE = $(FOAM_APPBIN)/overPotentialFoam

View File

@ -13,7 +13,7 @@ volVectorField U
);
// Initialise the velocity internal field to zero
U = dimensionedVector(U.dimensions(), Zero);
U = dimensionedVector("0", U.dimensions(), Zero);
surfaceScalarField phi
(
@ -28,7 +28,7 @@ surfaceScalarField phi
fvc::flux(U)
);
if (args.found("initialiseUBCs"))
if (args.optionFound("initialiseUBCs"))
{
U.correctBoundaryConditions();
phi = fvc::flux(U);
@ -41,7 +41,7 @@ if (args.found("initialiseUBCs"))
word pName("p");
// Update name of the pressure field from the command-line option
args.readIfPresent("pName", pName);
args.optionReadIfPresent("pName", pName);
// Infer the pressure BCs from the velocity
wordList pBCTypes
@ -74,7 +74,7 @@ volScalarField p
false
),
mesh,
dimensionedScalar(sqr(dimVelocity), Zero),
dimensionedScalar(pName, sqr(dimVelocity), 0),
pBCTypes
);
@ -105,7 +105,7 @@ volScalarField Phi
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(dimLength*dimVelocity, Zero),
dimensionedScalar("Phi", dimLength*dimVelocity, 0),
PhiBCTypes
);

View File

@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
overPotentialFoam
potentialFoam
Group
grpBasicSolvers
@ -193,13 +193,13 @@ int main(int argc, char *argv[])
phi.write();
// Optionally write Phi
if (args.found("writePhi"))
if (args.optionFound("writePhi"))
{
Phi.write();
}
// Calculate the pressure field from the Euler equation
if (args.found("writep"))
if (args.optionFound("writep"))
{
Info<< nl << "Calculating approximate pressure field" << endl;
@ -247,7 +247,9 @@ int main(int argc, char *argv[])
runTime.functionObjects().end();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
Info<< "End\n" << endl;

View File

@ -125,7 +125,6 @@ int main(int argc, char *argv[])
"execute functionObjects"
);
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -182,13 +181,13 @@ int main(int argc, char *argv[])
phi.write();
// Optionally write Phi
if (args.found("writePhi"))
if (args.optionFound("writePhi"))
{
Phi.write();
}
// Calculate the pressure field from the Euler equation
if (args.found("writep"))
if (args.optionFound("writep"))
{
Info<< nl << "Calculating approximate pressure field" << endl;
@ -236,7 +235,9 @@ int main(int argc, char *argv[])
runTime.functionObjects().end();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
Info<< "End\n" << endl;

View File

@ -55,5 +55,3 @@ dimensionedScalar DT
);
#include "createPhi.H"
#include "createFvOptions.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,7 +61,6 @@ Description
int main(int argc, char *argv[])
{
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -69,6 +68,7 @@ int main(int argc, char *argv[])
simpleControl simple(mesh);
#include "createFields.H"
#include "createFvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -78,6 +78,7 @@ Description
#include "XiModel.H"
#include "PDRDragModel.H"
#include "ignition.H"
#include "Switch.H"
#include "bound.H"
#include "pimpleControl.H"
#include "fvOptions.H"
@ -88,7 +89,6 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -97,6 +97,7 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
@ -149,7 +150,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "\nExecutionTime = "
<< runTime.elapsedCpuTime()
<< " s\n" << endl;
}
Info<< "\n end\n";

View File

@ -63,6 +63,7 @@ Description
#include "XiModel.H"
#include "PDRDragModel.H"
#include "ignition.H"
#include "Switch.H"
#include "bound.H"
#include "dynamicRefineFvMesh.H"
#include "pimpleControl.H"
@ -102,7 +103,7 @@ int main(int argc, char *argv[])
#include "setDeltaT.H"
// Indicators for refinement. Note: before runTime++
// only for post-processing reasons.
// only for postprocessing reasons.
tmp<volScalarField> tmagGradP = mag(fvc::grad(p));
volScalarField normalisedGradP
(
@ -121,20 +122,20 @@ int main(int argc, char *argv[])
fvc::makeAbsolute(phi, rho, U);
// Test : disable refinement for some cells
bitSet& protectedCell =
PackedBoolList& protectedCell =
refCast<dynamicRefineFvMesh>(mesh).protectedCell();
if (protectedCell.empty())
{
protectedCell.setSize(mesh.nCells());
protectedCell = false;
protectedCell = 0;
}
forAll(betav, celli)
{
if (betav[celli] < 0.99)
{
protectedCell.set(celli);
protectedCell[celli] = 1;
}
}
@ -197,7 +198,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "\nExecutionTime = "
<< runTime.elapsedCpuTime()
<< " s\n" << endl;
}
Info<< "\n end\n";

View File

@ -103,7 +103,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
IOobject::NO_WRITE
),
mesh,
dimensionedScalar(Nv.dimensions(), Zero)
dimensionedScalar("zero", Nv.dimensions(), 0.0)
);
N.primitiveFieldRef() = Nv.primitiveField()*Cw;
@ -118,7 +118,12 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const
IOobject::NO_WRITE
),
U.mesh(),
dimensionedSymmTensor(nsv.dimensions(), Zero)
dimensionedSymmTensor
(
"zero",
nsv.dimensions(),
Zero
)
);
ns.primitiveFieldRef() = nsv.primitiveField()*Cw;

View File

@ -25,7 +25,7 @@ Class
Foam::XiEqModels::basicSubGrid
Description
Basic sub-grid obstacle flame-wrinkling enhancement factor model.
Basic sub-grid obstacle flame-wrinking enhancement factor model.
Details supplied by J Puttock 2/7/06.
<b> Sub-grid flame area generation </b>
@ -94,11 +94,11 @@ class basicSubGrid
// Private Member Functions
//- No copy construct
basicSubGrid(const basicSubGrid&) = delete;
//- Disallow copy construct
basicSubGrid(const basicSubGrid&);
//- No copy assignment
void operator=(const basicSubGrid&) = delete;
//- Disallow default bitwise assignment
void operator=(const basicSubGrid&);
public:
@ -125,7 +125,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const;
//- Update properties from given dictionary

View File

@ -26,7 +26,7 @@ Class
Description
Basic sub-grid obstacle flame-wrinkling generation rate coefficient model.
Basic sub-grid obstacle flame-wrinking generation rate coefficient model.
Details supplied by J Puttock 2/7/06.
\f$ G_{sub} \f$ denotes the generation coefficient and it is given by
@ -82,11 +82,11 @@ class basicSubGrid
// Private Member Functions
//- No copy construct
basicSubGrid(const basicSubGrid&) = delete;
//- Disallow copy construct
basicSubGrid(const basicSubGrid&);
//- No copy assignment
void operator=(const basicSubGrid&) = delete;
//- Disallow default bitwise assignment
void operator=(const basicSubGrid&);
public:
@ -113,7 +113,7 @@ public:
// Member Functions
//- Return the flame-wrinkling generation rate
//- Return the flame-wrinking generation rate
virtual tmp<volScalarField> G() const;
//- Return the flame diffusivity

View File

@ -58,14 +58,14 @@ Foam::PDRDragModel::PDRDragModel
(
PDRProperties.subDict
(
PDRProperties.get<word>("PDRDragModel") + "Coeffs"
word(PDRProperties.lookup("PDRDragModel")) + "Coeffs"
)
),
turbulence_(turbulence),
rho_(rho),
U_(U),
phi_(phi),
on_(PDRDragModelCoeffs_.get<bool>("drag"))
on_(PDRDragModelCoeffs_.lookup("drag"))
{}
@ -81,7 +81,7 @@ bool Foam::PDRDragModel::read(const dictionary& PDRProperties)
{
PDRDragModelCoeffs_ = PDRProperties.optionalSubDict(type() + "Coeffs");
PDRDragModelCoeffs_.read("drag", on_);
PDRDragModelCoeffs_.lookup("drag") >> on_;
return true;
}

View File

@ -67,18 +67,18 @@ protected:
const volVectorField& U_;
const surfaceScalarField& phi_;
bool on_;
Switch on_;
private:
// Private Member Functions
//- No copy construct
PDRDragModel(const PDRDragModel&) = delete;
//- Disallow copy construct
PDRDragModel(const PDRDragModel&);
//- No copy assignment
void operator=(const PDRDragModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const PDRDragModel&);
public:

View File

@ -36,9 +36,9 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
const surfaceScalarField& phi
)
{
const word modelType(PDRProperties.get<word>("PDRDragModel"));
const word modelType(PDRProperties.lookup("PDRDragModel"));
Info<< "Selecting drag model " << modelType << endl;
Info<< "Selecting flame-wrinkling model " << modelType << endl;
auto cstrIter = dictionaryConstructorTablePtr_->cfind(modelType);

View File

@ -104,7 +104,12 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const
IOobject::NO_WRITE
),
U_.mesh(),
dimensionedSymmTensor(dimMass/dimTime/dimVolume, Zero)
dimensionedSymmTensor
(
"zero",
dimMass/dimTime/pow(dimLength, 3),
Zero
)
)
);
@ -138,7 +143,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const
IOobject::NO_WRITE
),
U_.mesh(),
dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero)
dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0)
)
);
@ -165,8 +170,8 @@ bool Foam::PDRDragModels::basic::read(const dictionary& PDRProperties)
{
PDRDragModel::read(PDRProperties);
PDRDragModelCoeffs_.read("Csu", Csu.value());
PDRDragModelCoeffs_.read("Csk", Csk.value());
PDRDragModelCoeffs_.lookup("Csu") >> Csu.value();
PDRDragModelCoeffs_.lookup("Csk") >> Csk.value();
return true;
}

View File

@ -108,11 +108,11 @@ class basic
// Private Member Functions
//- No copy construct
basic(const basic&) = delete;
//- Disallow copy construct
basic(const basic&);
//- No copy assignment
void operator=(const basic&) = delete;
//- Disallow default bitwise assignment
void operator=(const basic&);
public:

View File

@ -129,7 +129,7 @@ void PDRkEpsilon::correct()
volScalarField G(GName(), rho_*nut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
// Update epsilon and G at the wall
// Update espsilon and G at the wall
epsilon_.boundaryFieldRef().updateCoeffs();
// Add the blockage generation term so that it is included consistently

View File

@ -70,11 +70,11 @@ class Gulder
// Private Member Functions
//- No copy construct
Gulder(const Gulder&) = delete;
//- Disallow copy construct
Gulder(const Gulder&);
//- No copy assignment
void operator=(const Gulder&) = delete;
//- Disallow default bitwise assignment
void operator=(const Gulder&);
public:
@ -101,7 +101,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const;
//- Update properties from given dictionary

View File

@ -66,11 +66,11 @@ class SCOPEBlend
// Private Member Functions
//- No copy construct
SCOPEBlend(const SCOPEBlend&) = delete;
//- Disallow copy construct
SCOPEBlend(const SCOPEBlend&);
//- No copy assignment
void operator=(const SCOPEBlend&) = delete;
//- Disallow default bitwise assignment
void operator=(const SCOPEBlend&);
public:
@ -97,7 +97,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const;
//- Update properties from given dictionary

View File

@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const
IOobject::NO_WRITE
),
epsilon.mesh(),
dimensionedScalar(dimless, Zero)
dimensionedScalar("XiEq", dimless, 0.0)
)
);
volScalarField& xieq = tXiEq.ref();

View File

@ -84,11 +84,11 @@ class SCOPEXiEq
// Private Member Functions
//- No copy construct
SCOPEXiEq(const SCOPEXiEq&) = delete;
//- Disallow copy construct
SCOPEXiEq(const SCOPEXiEq&);
//- No copy assignment
void operator=(const SCOPEXiEq&) = delete;
//- Disallow default bitwise assignment
void operator=(const SCOPEXiEq&);
public:
@ -115,7 +115,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const;
//- Update properties from given dictionary

View File

@ -110,7 +110,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
false
),
mesh,
dimensionedScalar(Nv.dimensions(), Zero)
dimensionedScalar("zero", Nv.dimensions(), 0.0)
)
);
volScalarField& N = tN.ref();
@ -127,7 +127,12 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
IOobject::NO_WRITE
),
mesh,
dimensionedSymmTensor(nsv.dimensions(), Zero)
dimensionedSymmTensor
(
"zero",
nsv.dimensions(),
Zero
)
);
ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0);

View File

@ -79,11 +79,11 @@ private:
// Private Member Functions
//- No copy construct
XiEqModel(const XiEqModel&) = delete;
//- Disallow copy construct
XiEqModel(const XiEqModel&);
//- No copy assignment
void operator=(const XiEqModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const XiEqModel&);
public:
@ -144,7 +144,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const
{
return turbulence_.muEff();

View File

@ -65,11 +65,11 @@ class instability
// Private Member Functions
//- No copy construct
instability(const instability&) = delete;
//- Disallow copy construct
instability(const instability&);
//- No copy assignment
void operator=(const instability&) = delete;
//- Disallow default bitwise assignment
void operator=(const instability&);
public:
@ -96,7 +96,7 @@ public:
// Member Functions
//- Return the flame-wrinkling XiEq
//- Return the flame-wrinking XiEq
virtual tmp<volScalarField> XiEq() const;
//- Update properties from given dictionary

View File

@ -60,11 +60,11 @@ class KTS
// Private Member Functions
//- No copy construct
KTS(const KTS&) = delete;
//- Disallow copy construct
KTS(const KTS&);
//- No copy assignment
void operator=(const KTS&) = delete;
//- Disallow default bitwise assignment
void operator=(const KTS&);
public:
@ -91,7 +91,7 @@ public:
// Member Functions
//- Return the flame-wrinkling generation rate
//- Return the flame-wrinking generation rate
virtual tmp<volScalarField> G() const;
//- Update properties from given dictionary

View File

@ -70,11 +70,11 @@ private:
// Private Member Functions
//- No copy construct
XiGModel(const XiGModel&) = delete;
//- Disallow copy construct
XiGModel(const XiGModel&);
//- No copy assignment
void operator=(const XiGModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const XiGModel&);
public:
@ -135,7 +135,7 @@ public:
// Member Functions
//- Return the flame-wrinkling generation rate
//- Return the flame-wrinking genration rate
virtual tmp<volScalarField> G() const = 0;
//- Return the flame diffusivity

View File

@ -25,7 +25,7 @@ Class
Foam::XiGModels::instabilityG
Description
Flame-surface instabilityG flame-wrinkling generation rate coefficient model
Flame-surface instabilityG flame-wrinking generation rate coefficient model
used in \link XiModel.H \endlink.
See Technical Report SH/RE/01R for details on the PDR modelling.
@ -57,7 +57,7 @@ class instabilityG
{
// Private data
//- Flame instabilityG wrinkling generation rate coefficient
//- Flame instabilityG wrinling generation rate coefficient
dimensionedScalar GIn_;
//- InstabilityG length-scale
@ -69,11 +69,11 @@ class instabilityG
// Private Member Functions
//- No copy construct
instabilityG(const instabilityG&) = delete;
//- Disallow copy construct
instabilityG(const instabilityG&);
//- No copy assignment
void operator=(const instabilityG&) = delete;
//- Disallow default bitwise assignment
void operator=(const instabilityG&);
public:
@ -100,7 +100,7 @@ public:
// Member Functions
//- Return the flame-wrinkling generation rate
//- Return the flame-wrinking generation rate
virtual tmp<volScalarField> G() const;
//- Return the flame diffusivity

View File

@ -122,7 +122,7 @@ protected:
const volScalarField& b_;
const surfaceScalarField& phi_;
//- Flame wrinkling field
//- Flame wrinking field
volScalarField Xi_;
@ -130,11 +130,11 @@ private:
// Private Member Functions
//- No copy construct
XiModel(const XiModel&) = delete;
//- Disallow copy construct
XiModel(const XiModel&);
//- No copy assignment
void operator=(const XiModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const XiModel&);
public:
@ -207,7 +207,7 @@ public:
// Member Functions
//- Return the flame-wrinkling Xi
//- Return the flame-wrinking Xi
virtual const volScalarField& Xi() const
{
return Xi_;
@ -227,10 +227,10 @@ public:
)
{}
//- Correct the flame-wrinkling Xi
//- Correct the flame-wrinking Xi
virtual void correct() = 0;
//- Correct the flame-wrinkling Xi using the given convection scheme
//- Correct the flame-wrinking Xi using the given convection scheme
virtual void correct(const fv::convectionScheme<scalar>&)
{
correct();

View File

@ -67,11 +67,11 @@ class algebraic
// Private Member Functions
//- No copy construct
algebraic(const algebraic&) = delete;
//- Disallow copy construct
algebraic(const algebraic&);
//- No copy assignment
void operator=(const algebraic&) = delete;
//- Disallow default bitwise assignment
void operator=(const algebraic&);
public:
@ -104,7 +104,7 @@ public:
//- Return the flame diffusivity
virtual tmp<volScalarField> Db() const;
//- Correct the flame-wrinkling Xi
//- Correct the flame-wrinking Xi
virtual void correct();
//- Update properties from given dictionary

View File

@ -55,11 +55,11 @@ class fixed
{
// Private Member Functions
//- No copy construct
fixed(const fixed&) = delete;
//- Disallow copy construct
fixed(const fixed&);
//- No copy assignment
void operator=(const fixed&) = delete;
//- Disallow default bitwise assignment
void operator=(const fixed&);
public:
@ -89,7 +89,7 @@ public:
// Member Functions
//- Correct the flame-wrinkling Xi
//- Correct the flame-wrinking Xi
virtual void correct()
{}

View File

@ -67,11 +67,11 @@ class transport
// Private Member Functions
//- No copy construct
transport(const transport&) = delete;
//- Disallow copy construct
transport(const transport&);
//- No copy assignment
void operator=(const transport&) = delete;
//- Disallow default bitwise assignment
void operator=(const transport&);
public:
@ -113,13 +113,13 @@ public:
fields.add(Xi_);
}
//- Correct the flame-wrinkling Xi
//- Correct the flame-wrinking Xi
virtual void correct()
{
NotImplemented;
}
//- Correct the flame-wrinkling Xi using the given convection scheme
//- Correct the flame-wrinking Xi using the given convection scheme
virtual void correct(const fv::convectionScheme<scalar>& mvConvection);
//- Update properties from given dictionary

View File

@ -7,7 +7,7 @@ autoPtr<psiuReactionThermo> pThermo
psiuReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "ha", "ea");
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
volScalarField rho
(
@ -165,7 +165,7 @@ IOdictionary PDRProperties
autoPtr<PDRDragModel> drag = PDRDragModel::New
(
PDRProperties,
*turbulence,
turbulence,
rho,
U,
phi
@ -176,7 +176,7 @@ autoPtr<XiModel> flameWrinkling = XiModel::New
(
PDRProperties,
thermo,
*turbulence,
turbulence,
Su,
rho,
b,
@ -215,4 +215,3 @@ flameWrinkling->addXi(fields);
#include "createK.H"
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -73,37 +73,17 @@ Foam::laminarFlameSpeedModels::SCOPE::SCOPE
(
dictionary
(
IFstream
(
fileName
(
dict.lookup("fuelFile")
)
)()
IFstream
(
fileName
(
dict.lookup("fuelFile")
)
)()
).optionalSubDict(typeName + "Coeffs")
),
LFL_
(
readScalar
(
coeffsDict_.lookupCompat
(
"lowerFlammabilityLimit",
{{"lowerFlamabilityLimit", 1712}}
)
)
),
UFL_
(
readScalar
(
coeffsDict_.lookupCompat
(
"upperFlammabilityLimit",
{{"upperFlamabilityLimit", 1712}}
)
)
),
LFL_(readScalar(coeffsDict_.lookup("lowerFlamabilityLimit"))),
UFL_(readScalar(coeffsDict_.lookup("upperFlamabilityLimit"))),
SuPolyL_(coeffsDict_.subDict("lowerSuPolynomial")),
SuPolyU_(coeffsDict_.subDict("upperSuPolynomial")),
Texp_(readScalar(coeffsDict_.lookup("Texp"))),
@ -165,19 +145,19 @@ inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
{
if (phi < LFL_ || phi > UFL_)
{
// Return 0 beyond the flammability limits
// Return 0 beyond the flamibility limits
return scalar(0);
}
else if (phi < SuPolyL_.ll)
{
// Use linear interpolation between the low end of the
// lower polynomial and the lower flammability limit
// lower polynomial and the lower flamibility limit
return SuPolyL_.llv*(phi - LFL_)/(SuPolyL_.ll - LFL_);
}
else if (phi > SuPolyU_.ul)
{
// Use linear interpolation between the upper end of the
// upper polynomial and the upper flammability limit
// upper polynomial and the upper flamibility limit
return SuPolyU_.ulv*(UFL_ - phi)/(UFL_ - SuPolyU_.ul);
}
else if (phi < SuPolyL_.lu)
@ -275,7 +255,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
IOobject::NO_WRITE
),
p.mesh(),
dimensionedScalar(dimVelocity, Zero)
dimensionedScalar("Su0", dimVelocity, 0.0)
)
);
@ -324,7 +304,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
IOobject::NO_WRITE
),
p.mesh(),
dimensionedScalar(dimVelocity, Zero)
dimensionedScalar("Su0", dimVelocity, 0.0)
)
);
@ -378,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma
IOobject::NO_WRITE
),
phi.mesh(),
dimensionedScalar(dimless, Zero)
dimensionedScalar("Ma", dimless, 0.0)
)
);

View File

@ -109,10 +109,10 @@ class SCOPE
dictionary coeffsDict_;
//- Lower flammability limit
//- Lower flamability limit
scalar LFL_;
//- Upper flammability limit
//- Upper flamability limit
scalar UFL_;
//- Lower Su polynomial

View File

@ -77,6 +77,7 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createRhoUf.H"
#include "createControls.H"
@ -169,7 +170,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -2,10 +2,10 @@
bool correctPhi
(
pimple.dict().lookupOrDefault("correctPhi", true)
pimple.dict().lookupOrDefault<Switch>("correctPhi", true)
);
bool checkMeshCourantNo
(
pimple.dict().lookupOrDefault("checkMeshCourantNo", false)
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false)
);

View File

@ -1,6 +1,6 @@
#include "readTimeControls.H"
correctPhi = pimple.dict().lookupOrDefault("correctPhi", true);
correctPhi = pimple.dict().lookupOrDefault<Switch>("correctPhi", true);
checkMeshCourantNo =
pimple.dict().lookupOrDefault("checkMeshCourantNo", false);
pimple.dict().lookupOrDefault<Switch>("checkMeshCourantNo", false);

View File

@ -1,3 +0,0 @@
XiEngineFoam.C
EXE = $(FOAM_APPBIN)/XiEngineFoam

View File

@ -1,19 +0,0 @@
Info<< "Total cylinder mass: " << fvc::domainIntegrate(rho).value() << endl;
autoPtr<OFstream> logSummaryFile;
if (Pstream::master())
{
logSummaryFile.reset
(
new OFstream
(
runTime.rootPath()/runTime.globalCaseName()
/("logSummary." + runTime.timeName() + ".dat")
)
);
logSummaryFile()
<< "# CA" << " p" << " T" << " u'" << " c"
<< endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,6 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -75,6 +74,7 @@ int main(int argc, char *argv[])
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
@ -128,7 +128,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -243,7 +243,7 @@ if (ign.ignited())
rho*max
(
sigmat - sigmas,
dimensionedScalar(sigmat.dimensions(), Zero)
dimensionedScalar("0", sigmat.dimensions(), 0)
),
Xi
)

View File

@ -7,7 +7,7 @@ autoPtr<psiuReactionThermo> pThermo
psiuReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "ha", "ea");
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
volScalarField rho
(
@ -129,4 +129,3 @@ fields.add(thermo.heu());
#include "createK.H"
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -9,4 +9,4 @@
mesh.solver("Yi")
);
}
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,13 +37,12 @@ Description
#include "fvCFD.H"
#include "psiReactionThermo.H"
#include "BasicChemistryModel.H"
#include "reactingMixture.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "OFstream.H"
#include "thermoPhysicsTypes.H"
#include "basicSpecieMixture.H"
#include "hexCellFvMesh.H"
#include "basicMultiComponentMixture.H"
#include "cellModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -83,7 +82,9 @@ int main(int argc, char *argv[])
#include "output.H"
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info << "Number of steps = " << runTime.timeIndex() << endl;

View File

@ -1,3 +1,2 @@
bool adjustTimeStep(runTime.controlDict().get<bool>("adjustTimeStep"));
scalar maxDeltaT(runTime.controlDict().get<scalar>("maxDeltaT"));
Switch adjustTimeStep(runTime.controlDict().lookup("adjustTimeStep"));
scalar maxDeltaT(readScalar(runTime.controlDict().lookup("maxDeltaT")));

View File

@ -1,8 +1,4 @@
BasicChemistryModel<psiReactionThermo>& chemistry = pChemistry();
scalar dtChem = refCast<const BasicChemistryModel<psiReactionThermo>>
(
chemistry
).deltaTChem()[0];
basicSpecieMixture& composition = thermo.composition();
scalar dtChem = refCast<const psiChemistryModel>(chemistry).deltaTChem()[0];
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
volScalarField& p = thermo.p();

View File

@ -23,15 +23,13 @@
#include "createBaseFields.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
thermo.validate(args.executable(), "h");
Info<< nl << "Reading thermophysicalProperties" << endl;
autoPtr<psiChemistryModel> pChemistry(psiChemistryModel::New(mesh));
autoPtr<BasicChemistryModel<psiReactionThermo>> pChemistry
(
BasicChemistryModel<psiReactionThermo>::New(thermo)
);
psiChemistryModel& chemistry = pChemistry();
psiReactionThermo& thermo = chemistry.thermo();
thermo.validate(args.executable(), "h");
volScalarField rho
(
@ -57,7 +55,12 @@
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero)
dimensionedScalar
(
"zero",
dimensionSet(dimEnergy/dimMass/dimTemperature),
0.0
)
);
volVectorField U
@ -71,7 +74,7 @@
IOobject::NO_WRITE
),
mesh,
dimensionedVector(dimVelocity, Zero)
dimensionedVector("zero", dimVelocity, Zero)
);
#include "createPhi.H"

View File

@ -1,3 +1,45 @@
Info<< "Constructing single cell mesh" << nl << endl;
Foam::simplifiedMeshes::hexCellFvMesh mesh(runTime);
labelList owner(6, label(0));
labelList neighbour(0);
pointField points(8);
points[0] = vector(0, 0, 0);
points[1] = vector(1, 0, 0);
points[2] = vector(1, 1, 0);
points[3] = vector(0, 1, 0);
points[4] = vector(0, 0, 1);
points[5] = vector(1, 0, 1);
points[6] = vector(1, 1, 1);
points[7] = vector(0, 1, 1);
faceList faces = cellModel::ref(cellModel::HEX).modelFaces();
fvMesh mesh
(
IOobject
(
fvMesh::defaultRegion,
runTime.timeName(),
runTime,
IOobject::READ_IF_PRESENT
),
xferMove<pointField>(points),
faces.xfer(),
owner.xfer(),
neighbour.xfer()
);
List<polyPatch*> patches(1);
patches[0] = new emptyPolyPatch
(
"boundary",
6,
0,
0,
mesh.boundaryMesh(),
emptyPolyPatch::typeName
);
mesh.addFvPatches(patches);

View File

@ -1,3 +1,3 @@
runTime.controlDict().read("adjustTimeStep", adjustTimeStep);
runTime.controlDict().lookup("adjustTimeStep") >> adjustTimeStep;
runTime.controlDict().read("maxDeltaT", maxDeltaT);
maxDeltaT = readScalar(runTime.controlDict().lookup("maxDeltaT"));

View File

@ -1,6 +1,6 @@
EXE_INC = \
-I. \
-I../XiFoam/XiEngineFoam \
-I../engineFoam \
-I../XiFoam \
-I../../compressible/rhoPimpleFoam \
-I$(LIB_SRC)/engine/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -55,6 +55,7 @@ int main(int argc, char *argv[])
#include "createControl.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"
#include "readEngineTimeControls.H"
@ -76,7 +77,7 @@ int main(int argc, char *argv[])
runTime++;
Info<< "Engine time = " << runTime.theta() << runTime.unit()
Info<< "Crank angle = " << runTime.theta() << " CA-deg"
<< endl;
mesh.move();
@ -105,7 +106,9 @@ int main(int argc, char *argv[])
#include "logSummary.H"
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -56,4 +56,3 @@ autoPtr<compressible::turbulenceModel> turbulence
#include "createK.H"
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -1,20 +1,12 @@
{
const scalar meanp = p.weightedAverage(mesh.V()).value();
const scalar meanT = T.weightedAverage(mesh.V()).value();
const scalar meanup =
(sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value();
Info<< "Mean pressure:" << p.weightedAverage(mesh.V()).value() << endl;
Info<< "Mean temperature:" << T.weightedAverage(mesh.V()).value() << endl;
Info<< "Mean u':"
<< (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value()
<< endl;
if (Pstream::master())
{
Info<< "Mean pressure:" << meanp << endl;
Info<< "Mean temperature:" << meanT << endl;
Info<< "Mean u':" << meanup << endl;
logSummaryFile()
<< runTime.theta() << tab
<< meanp << tab
<< meanT << tab
<< meanup
<< endl;
}
}
logSummaryFile
<< runTime.theta() << tab
<< p.weightedAverage(mesh.V()).value() << tab
<< T.weightedAverage(mesh.V()).value() << tab
<< (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value()
<< endl;

View File

@ -1,18 +1,9 @@
Info<< "Total cylinder mass: " << fvc::domainIntegrate(rho).value() << endl;
autoPtr<OFstream> logSummaryFile;
OFstream logSummaryFile
(
runTime.path()/("logSummary." + runTime.timeName() + ".dat")
);
if (Pstream::master())
{
logSummaryFile.reset
(
new OFstream
(
runTime.rootPath()/runTime.globalCaseName()
/("logSummary." + runTime.timeName() + ".dat")
)
);
logSummaryFile()
<< "# CA" << " p" << " T" << " u'" << endl;
}
logSummaryFile
<< "# CA" << " p" << " T" << " u'" << endl;

View File

@ -1,5 +1,5 @@
EXE_INC = \
-I.. \
-I$(FOAM_SOLVERS)/combustion/XiFoam \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,7 +22,10 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Application
XiEngineFoam
engineFoam
Group
grpCombustionSolvers
Description
Solver for internal combustion engines.
@ -76,6 +79,7 @@ int main(int argc, char *argv[])
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "initContinuityErrs.H"
#include "readEngineTimeControls.H"

View File

@ -5,7 +5,7 @@ Info<< "Mean u':"
<< (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value()
<< endl;
logSummaryFile()
logSummaryFile
<< runTime.theta() << tab
<< p.weightedAverage(mesh.V()).value() << tab
<< thermo.T().weightedAverage(mesh.V()).value() << tab

View File

@ -13,10 +13,7 @@ if (pimple.transonic())
*(
(
fvc::flux(HbyA)
+ MRF.zeroFilter
(
rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
)
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
)
)
);
@ -50,7 +47,7 @@ else
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf))
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
)
);

View File

@ -1,11 +1,21 @@
Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModels::psiCombustionModel> combustion
(
combustionModels::psiCombustionModel::New
(
mesh
)
);
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
psiReactionThermo& thermo = combustion->thermo();
thermo.validate(args.executable(), "h", "e");
SLGThermo slgThermo(mesh, thermo);
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
@ -64,11 +74,8 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
Info<< "Creating combustion model\n" << endl;
autoPtr<CombustionModel<psiReactionThermo>> combustion
(
CombustionModel<psiReactionThermo>::New(thermo, turbulence())
);
// Set the turbulence into the combustion model
combustion->setTurbulence(turbulence());
#include "readGravitationalAcceleration.H"
@ -102,6 +109,28 @@ forAll(Y, i)
}
fields.add(thermo.he());
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);
Switch solvePyrolysisRegion
(
additionalControlsDict.lookupOrDefault<bool>("solvePyrolysisRegion", true)
);
volScalarField Qdot
(
IOobject
@ -113,7 +142,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#include "createDpdt.H"
@ -124,4 +153,3 @@ volScalarField Qdot
#include "createSurfaceFilmModel.H"
#include "createPyrolysisModel.H"
#include "createRadiationModel.H"
#include "createFvOptions.H"

View File

@ -1,23 +0,0 @@
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();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,8 +41,7 @@ Description
#include "radiationModel.H"
#include "SLGThermo.H"
#include "solidChemistryModel.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "psiCombustionModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
@ -52,18 +51,18 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
#include "createTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
#include "createRegionControls.H"
#include "readPyrolysisTimeControls.H"
turbulence->validate();
@ -119,7 +118,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End" << endl;

View File

@ -11,7 +11,7 @@ surfaceScalarField phiHbyA
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
)
+ phig
);

View File

@ -1,4 +1,4 @@
if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false))
if (pimple.dict().lookupOrDefault<bool>("hydrostaticInitialization", false))
{
volScalarField& ph_rgh = regIOobject::store
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -22,15 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global
updateUf
readPyrolysisTimeControls
Description
Constructs the face velocity field Uf if not already constructed.
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#error Remove updateUf.H
scalar maxDi = pyrolysis.maxDiff();
// ************************************************************************* //

View File

@ -1,11 +1,16 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiReactionThermo> pThermo(psiReactionThermo::New(mesh));
psiReactionThermo& thermo = pThermo();
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::psiCombustionModel> reaction
(
combustionModels::psiCombustionModel::New(mesh)
);
psiReactionThermo& thermo = reaction->thermo();
thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
@ -13,7 +18,8 @@ if (!composition.species().found(inertSpecie))
{
FatalIOErrorIn(args.executable().c_str(), thermo)
<< "Inert specie " << inertSpecie << " not found in available species "
<< composition.species() << exit(FatalIOError);
<< composition.species()
<< exit(FatalIOError);
}
volScalarField rho
@ -41,6 +47,7 @@ volVectorField U
mesh
);
volScalarField& p = thermo.p();
#include "compressibleCreatePhi.H"
@ -61,11 +68,8 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
Info<< "Creating reaction model\n" << endl;
autoPtr<CombustionModel<psiReactionThermo>> reaction
(
CombustionModel<psiReactionThermo>::New(thermo, turbulence())
);
// Set the turbulence into the reaction model
reaction->setTurbulence(turbulence());
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
@ -86,7 +90,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#include "createDpdt.H"
@ -94,4 +98,3 @@ volScalarField Qdot
#include "createK.H"
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -17,10 +17,7 @@ if (pimple.transonic())
fvc::interpolate(psi)
*(
fvc::flux(HbyA)
+ MRF.zeroFilter
(
rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
)
+ rhorAUf*fvc::ddtCorr(rho, U, phi)/fvc::interpolate(rho)
)
);
@ -52,7 +49,7 @@ else
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
)
);

View File

@ -17,11 +17,8 @@ if (pimple.transonic())
fvc::interpolate(psi)
*(
fvc::flux(HbyA)
+ MRF.zeroFilter
(
fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
/fvc::interpolate(rho)
)
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
/fvc::interpolate(rho)
)
);
@ -64,7 +61,7 @@ else
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi))
+ fvc::interpolate(rho*rAU)*fvc::ddtCorr(rho, U, phi)
)
);

View File

@ -34,8 +34,7 @@ Description
#include "fvCFD.H"
#include "turbulentFluidThermoModel.H"
#include "psiReactionThermo.H"
#include "CombustionModel.H"
#include "psiCombustionModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
#include "pressureControl.H"
@ -49,7 +48,6 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -58,6 +56,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
turbulence->validate();
@ -120,7 +119,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -1,11 +1,16 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::rhoCombustionModel> reaction
(
combustionModels::rhoCombustionModel::New(mesh)
);
rhoReactionThermo& thermo = reaction->thermo();
thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
@ -62,11 +67,9 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
Info<< "Creating reaction model\n" << endl;
autoPtr<CombustionModel<rhoReactionThermo>> reaction
(
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
);
// Set the turbulence into the reaction model
reaction->setTurbulence(turbulence());
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
@ -108,7 +111,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#include "createDpdt.H"
@ -116,4 +119,3 @@ volScalarField Qdot
#include "createK.H"
#include "createMRF.H"
#include "createFvOptions.H"

View File

@ -15,7 +15,7 @@ surfaceScalarField phiHbyA
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi))
+ rhorAUf*fvc::ddtCorr(rho, U, phi)
)
+ phig
);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2017 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -34,8 +34,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "rhoCombustionModel.H"
#include "turbulentFluidThermoModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
@ -49,7 +48,6 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -58,6 +56,7 @@ int main(int argc, char *argv[])
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
turbulence->validate();
@ -114,7 +113,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -1,11 +1,16 @@
#include "createRDeltaT.H"
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
Info<< "Creating reaction model\n" << endl;
autoPtr<combustionModels::rhoCombustionModel> reaction
(
combustionModels::rhoCombustionModel::New(mesh)
);
rhoReactionThermo& thermo = reaction->thermo();
thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
const word inertSpecie(thermo.lookup("inertSpecie"));
@ -64,11 +69,8 @@ autoPtr<compressible::turbulenceModel> turbulence
)
);
Info<< "Creating reaction model\n" << endl;
autoPtr<CombustionModel<rhoReactionThermo>> reaction
(
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
);
// Set the turbulence into the reaction model
reaction->setTurbulence(turbulence());
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
@ -89,7 +91,7 @@ volScalarField Qdot
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero)
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#include "createDpdt.H"
@ -120,4 +122,3 @@ dimensionedScalar rhoMin
)
);
#include "createFvOptions.H"

View File

@ -34,8 +34,7 @@ Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#include "rhoCombustionModel.H"
#include "turbulentFluidThermoModel.H"
#include "multivariateScheme.H"
#include "pimpleControl.H"
@ -50,16 +49,15 @@ int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUfIfPresent.H"
#include "createTimeControls.H"
#include "createFvOptions.H"
turbulence->validate();
@ -123,7 +121,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -104,7 +104,7 @@ License
mesh
),
mesh,
dimensionedScalar(rDeltaT.dimensions(), Zero)
dimensionedScalar("rDeltaTY", rDeltaT.dimensions(), 0)
);
bool foundY = false;

View File

@ -1,5 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
(wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam)

View File

@ -63,7 +63,7 @@ int main(int argc, char *argv[])
#include "readFluxScheme.H"
const dimensionedScalar v_zero(dimVolume/dimTime, Zero);
dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0);
// Courant numbers used to adjust the time-step
scalar CoNum = 0.0;
@ -266,7 +266,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -48,7 +48,6 @@ int main(int argc, char *argv[])
#define NO_CONTROL
#include "postProcess.H"
#include "addCheckCaseOptions.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
@ -62,7 +61,7 @@ int main(int argc, char *argv[])
#include "readFluxScheme.H"
const dimensionedScalar v_zero(dimVolume/dimTime, Zero);
dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0);
// Courant numbers used to adjust the time-step
scalar CoNum = 0.0;
@ -255,7 +254,9 @@ int main(int argc, char *argv[])
runTime.write();
runTime.printExecutionTime(Info);
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;

View File

@ -17,7 +17,7 @@
const dictionary& eosDict = thermoDict.subDict("equationOfState");
bool local = eosDict.lookupOrDefault("local", false);
bool local = eosDict.lookupOrDefault<bool>("local", false);
// Evolve T as:
//

View File

@ -91,7 +91,7 @@ volScalarField dpdt
mesh
),
mesh,
dimensionedScalar(p.dimensions()/dimTime, Zero)
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
);
#include "createMRF.H"

Some files were not shown because too many files have changed in this diff Show More