From 6129a9350a6bcdaee10d321b2eaac208ac054ba6 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 30 Jan 2013 17:05:37 +0000 Subject: [PATCH 01/12] ENH: Code tidying --- .../externalCoupledMixedFvPatchField.C | 22 +++++++++++-------- .../externalCoupledMixedFvPatchField.H | 3 +++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C index d207981fca..5da9b8a19d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C @@ -52,6 +52,13 @@ Foam::fileName Foam::externalCoupledMixedFvPatchField::baseDir() const } +template +Foam::fileName Foam::externalCoupledMixedFvPatchField::lockFile() const +{ + return fileName(baseDir()/(lockName + ".lock")); +} + + template void Foam::externalCoupledMixedFvPatchField::createLockFile() const { @@ -65,7 +72,7 @@ void Foam::externalCoupledMixedFvPatchField::createLockFile() const Info<< type() << ": creating lock file" << endl; } - OFstream os(baseDir()/(lockName + ".lock")); + OFstream os(lockFile()); os << "waiting"; os.flush(); } @@ -84,7 +91,7 @@ void Foam::externalCoupledMixedFvPatchField::removeLockFile() const Info<< type() << ": removing lock file" << endl; } - rm(baseDir()/(lockName + ".lock")); + rm(lockFile()); } @@ -153,15 +160,13 @@ void Foam::externalCoupledMixedFvPatchField::writeAndWait os.flush(); } - const fileName lockFile(baseDir()/(lockName + ".lock")); - // remove lock file, signalling external source to execute removeLockFile(); if (log_) { - Info<< type() << ": beginning wait for lock file " << lockFile + Info<< type() << ": beginning wait for lock file " << lockFile() << endl; } @@ -189,13 +194,13 @@ void Foam::externalCoupledMixedFvPatchField::writeAndWait << " s" << abort(FatalError); } - IFstream is(lockFile); + IFstream is(lockFile()); if (is.good()) { if (log_) { - Info<< type() << ": found lock file " << lockFile << endl; + Info<< type() << ": found lock file " << lockFile() << endl; } found = true; @@ -438,8 +443,7 @@ void Foam::externalCoupledMixedFvPatchField::write(Ostream& os) const os.writeKeyword("fileName") << fName_ << token::END_STATEMENT << nl; os.writeKeyword("waitInterval") << waitInterval_ << token::END_STATEMENT << nl; - os.writeKeyword("timeOut") << timeOut_ << token::END_STATEMENT - << nl; + os.writeKeyword("timeOut") << timeOut_ << token::END_STATEMENT << nl; os.writeKeyword("calcFrequency") << calcFrequency_ << token::END_STATEMENT << nl; os.writeKeyword("log") << log_ << token::END_STATEMENT << nl; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H index 229d9bad6c..4b32cde06c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H @@ -137,6 +137,9 @@ protected: //- Return the file path to the base communications folder fileName baseDir() const; + //- Return the file path to the lock file + fileName lockFile() const; + //- Create lock file void createLockFile() const; From f69816fa38e5a4eec39c20416ad4e8513aefa98e Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 31 Jan 2013 15:36:41 +0000 Subject: [PATCH 02/12] ENH: Updated buoyantSimpleFoam to use rhoThermo --- .../heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C | 2 +- .../solvers/heatTransfer/buoyantSimpleFoam/createFields.H | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index 3d2c18e668..b58df5402e 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -31,7 +31,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "psiThermo.H" +#include "rhoThermo.H" #include "RASModel.H" #include "radiationModel.H" #include "simpleControl.H" diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index bb7a65cb1d..ffbf005916 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -1,10 +1,10 @@ Info<< "Reading thermophysical properties\n" << endl; - autoPtr pThermo + autoPtr pThermo ( - psiThermo::New(mesh) + rhoThermo::New(mesh) ); - psiThermo& thermo = pThermo(); + rhoThermo& thermo = pThermo(); thermo.validate(args.executable(), "h", "e"); volScalarField rho From 4eee4e0c7e0c7794f07d8b71e756bbd5ff3a209d Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 31 Jan 2013 15:38:47 +0000 Subject: [PATCH 03/12] STYLE: Updated header comments --- .../externalCoupledMixed/externalCoupledMixedFvPatchField.H | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H index 4b32cde06c..50376e097d 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.H @@ -47,7 +47,7 @@ Description $FOAM_CASE/comms/patchName/data.out - The lock file is then removed, instructing the exterbal source to take + The lock file is then removed, instructing the external source to take control of the program execution. When ready, the external program should create the return values, e.g. to file @@ -62,9 +62,9 @@ Description \table Property | Description | Required | Default value commsDir | communications folder | yes | - fileName | data transfer file name | yes | + fileName | transfer file name | yes | waitInterval | interval [s] between file checks | no | 1 - timeOut | time after which error invoked | no | 100*waitInterval + timeOut | time after which error invoked [s] |no |100*waitInterval calcFrequency | calculation frequency | no | 1 log | log program control | no | no \endtable From 72e3a7eeb39075fee3a66eb16cf6d51db66406a4 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 31 Jan 2013 15:39:28 +0000 Subject: [PATCH 04/12] ENH: Updated scalarTransport function object to handele compressible codes --- .../scalarTransport/scalarTransport.C | 63 +++++++++++++++---- .../scalarTransport/scalarTransport.H | 3 + 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index 9a2f655624..ad392c506b 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -146,6 +146,7 @@ Foam::scalarTransport::scalarTransport active_(true), phiName_("phi"), UName_("U"), + rhoName_("rho"), DT_(0.0), userDT_(false), resetOnStartUp_(false), @@ -192,6 +193,7 @@ void Foam::scalarTransport::read(const dictionary& dict) phiName_ = dict.lookupOrDefault("phiName", "phi"); UName_ = dict.lookupOrDefault("UName", "U"); + rhoName_ = dict.lookupOrDefault("rhoName", "rho"); userDT_ = false; if (dict.readIfPresent("DT", DT_)) @@ -237,24 +239,59 @@ void Foam::scalarTransport::execute() relaxCoeff = mesh_.equationRelaxationFactor(schemeVar); } - // solve - for (label i = 0; i <= nCorr_; i++) + if (phi.dimensions() == dimMass/dimTime) { - fvScalarMatrix TEqn - ( - fvm::ddt(T_) - + fvm::div(phi, T_, divScheme) - - fvm::laplacian(DT, T_, laplacianScheme) - == - fvOptions_(T_) - ); + const volScalarField& rho = + mesh_.lookupObject(rhoName_); - TEqn.relax(relaxCoeff); + // solve + for (label i = 0; i <= nCorr_; i++) + { + fvScalarMatrix TEqn + ( + fvm::ddt(rho, T_) + + fvm::div(phi, T_, divScheme) + - fvm::laplacian(DT, T_, laplacianScheme) + == + fvOptions_(rho, T_) + ); - fvOptions_.constrain(TEqn); + TEqn.relax(relaxCoeff); - TEqn.solve(mesh_.solverDict(UName_)); + fvOptions_.constrain(TEqn); + + TEqn.solve(mesh_.solverDict(schemeVar)); + } } + else if (phi.dimensions() == dimVolume/dimTime) + { + // solve + for (label i = 0; i <= nCorr_; i++) + { + fvScalarMatrix TEqn + ( + fvm::ddt(T_) + + fvm::div(phi, T_, divScheme) + - fvm::laplacian(DT, T_, laplacianScheme) + == + fvOptions_(T_) + ); + + TEqn.relax(relaxCoeff); + + fvOptions_.constrain(TEqn); + + TEqn.solve(mesh_.solverDict(schemeVar)); + } + } + else + { + FatalErrorIn("void Foam::scalarTransport::execute()") + << "Incompatible dimensions for phi: " << phi.dimensions() << nl + << "Dimensions should be " << dimMass/dimTime << " or " + << dimVolume/dimTime << endl; + } + Info<< endl; } diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H index fdeecdf360..a58ed22680 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H @@ -90,6 +90,9 @@ class scalarTransport //- Name of velocity field (optional) word UName_; + //- Name of density field (optional) + word rhoName_; + //- Diffusion coefficient (optional) scalar DT_; From e1913362ad56722a762d9247dcb580f149016c6d Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 31 Jan 2013 15:39:56 +0000 Subject: [PATCH 05/12] ENH: Added new thermoFoam utility --- .../solvers/heatTransfer/thermoFoam/EEqn.H | 34 ++++++ .../heatTransfer/thermoFoam/Make/files | 3 + .../heatTransfer/thermoFoam/Make/options | 24 ++++ .../heatTransfer/thermoFoam/createFields.H | 54 +++++++++ .../heatTransfer/thermoFoam/setAlphaEff.H | 93 +++++++++++++++ .../heatTransfer/thermoFoam/thermoFoam.C | 107 ++++++++++++++++++ 6 files changed, 315 insertions(+) create mode 100644 applications/solvers/heatTransfer/thermoFoam/EEqn.H create mode 100644 applications/solvers/heatTransfer/thermoFoam/Make/files create mode 100644 applications/solvers/heatTransfer/thermoFoam/Make/options create mode 100644 applications/solvers/heatTransfer/thermoFoam/createFields.H create mode 100644 applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H create mode 100644 applications/solvers/heatTransfer/thermoFoam/thermoFoam.C diff --git a/applications/solvers/heatTransfer/thermoFoam/EEqn.H b/applications/solvers/heatTransfer/thermoFoam/EEqn.H new file mode 100644 index 0000000000..51232bf0be --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/EEqn.H @@ -0,0 +1,34 @@ +{ + volScalarField& he = thermo.he(); + + fvScalarMatrix EEqn + ( + fvm::ddt(rho, he) + fvm::div(phi, he) + + fvc::ddt(rho, K) + fvc::div(phi, K) + + ( + he.name() == "e" + ? fvc::div + ( + fvc::absolute(phi/fvc::interpolate(rho), U), + p, + "div(phiv,p)" + ) + : -dpdt + ) + - fvm::laplacian(alphaEff, he) + == + radiation->Sh(thermo) + + fvOptions(rho, he) + ); + + EEqn.relax(); + + fvOptions.constrain(EEqn); + + EEqn.solve(); + + fvOptions.correct(he); + + thermo.correct(); + radiation->correct(); +} diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/files b/applications/solvers/heatTransfer/thermoFoam/Make/files new file mode 100644 index 0000000000..825ed0cba8 --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/Make/files @@ -0,0 +1,3 @@ +thermoFoam.C + +EXE = $(FOAM_APPBIN)/thermoFoam diff --git a/applications/solvers/heatTransfer/thermoFoam/Make/options b/applications/solvers/heatTransfer/thermoFoam/Make/options new file mode 100644 index 0000000000..14bd0d4d24 --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/Make/options @@ -0,0 +1,24 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lsampling \ + -lmeshTools \ + -lfvOptions \ + -lfluidThermophysicalModels \ + -lradiationModels \ + -lspecie \ + -lcompressibleTurbulenceModel \ + -lcompressibleRASModels \ + -lcompressibleLESModels diff --git a/applications/solvers/heatTransfer/thermoFoam/createFields.H b/applications/solvers/heatTransfer/thermoFoam/createFields.H new file mode 100644 index 0000000000..ffa6c3f3b5 --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/createFields.H @@ -0,0 +1,54 @@ + Info<< "Reading thermophysical properties\n" << endl; + + autoPtr pThermo(rhoThermo::New(mesh)); + rhoThermo& thermo = pThermo(); + thermo.validate(args.executable(), "h", "e"); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + thermo.rho() + ); + + volScalarField& p = thermo.p(); + + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "compressibleCreatePhi.H" + + #include "setAlphaEff.H" + + Info<< "Creating field dpdt\n" << endl; + volScalarField dpdt + ( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + ); + + Info<< "Creating field kinetic energy K\n" << endl; + volScalarField K("K", 0.5*magSqr(U)); diff --git a/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H new file mode 100644 index 0000000000..90b475794b --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/setAlphaEff.H @@ -0,0 +1,93 @@ + Info<< "Creating turbulence model\n" << endl; + tmp talphaEff; + + IOobject turbulenceHeader + ( + "turbulenceProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ + ); + + IOobject RASHeader + ( + "RASProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ + ); + + IOobject LESHeader + ( + "LESProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ + ); + + if (turbulenceHeader.headerOk()) + { + autoPtr turbulence + ( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + talphaEff = turbulence->alphaEff(); + } + else if (RASHeader.headerOk()) + { + autoPtr turbulence + ( + compressible::RASModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + talphaEff = turbulence->alphaEff(); + } + else if (LESHeader.headerOk()) + { + autoPtr turbulence + ( + compressible::LESModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + talphaEff = turbulence->alphaEff(); + } + else + { + talphaEff = tmp + ( + new volScalarField + ( + IOobject + ( + "alphaEff", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("0", dimMass/dimLength/dimTime, 0.0) + ) + ); + } + + const volScalarField& alphaEff = talphaEff(); diff --git a/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C new file mode 100644 index 0000000000..f5f88232d2 --- /dev/null +++ b/applications/solvers/heatTransfer/thermoFoam/thermoFoam.C @@ -0,0 +1,107 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + thermoFoam + +Description + Evolves the thermodynamics on a forzen flow field + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "rhoThermo.H" +#include "turbulenceModel.H" +#include "RASModel.H" +#include "LESModel.H" +#include "radiationModel.H" +#include "fvIOoptionList.H" +#include "simpleControl.H" +#include "pimpleControl.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "createFvOptions.H" + #include "createRadiationModel.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nEvolving thermodynamics\n" << endl; + + if (mesh.solutionDict().found("SIMPLE")) + { + simpleControl simple(mesh); + + while (simple.loop()) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + while (simple.correctNonOrthogonal()) + { + #include "EEqn.H" + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + + runTime.write(); + } + } + else + { + pimpleControl pimple(mesh); + + while (runTime.run()) + { + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + while (pimple.correctNonOrthogonal()) + { + #include "EEqn.H" + } + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + + runTime.write(); + } + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // From ed96224c12812cb4a845843001307314b51f2ca6 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 1 Feb 2013 12:49:51 +0000 Subject: [PATCH 06/12] ENH: Updated buoyantSimpleFoam tuts --- .../buoyantCavity/constant/thermophysicalProperties | 2 +- .../buoyantSimpleFoam/buoyantCavity/system/fvSolution | 10 +++++----- .../constant/thermophysicalProperties | 2 +- .../hotRadiationRoom/constant/thermophysicalProperties | 2 +- .../constant/thermophysicalProperties | 2 +- .../hotRoom/constant/thermophysicalProperties | 4 +--- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties index 5ba8a553e1..95579e34cb 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution index d30cdf20b4..cd216b7fc2 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -42,16 +42,16 @@ solvers SIMPLE { - momentumPredictor yes; + momentumPredictor no; nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; residualControl { - p_rgh 1e-2; - U 1e-3; - h 1e-3; + p_rgh 1e-4; + U 1e-4; + h 1e-4; // possibly check turbulence fields "(k|epsilon|omega)" 1e-3; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties index 5ba8a553e1..95579e34cb 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/thermophysicalProperties index 7964a240ae..ab678e4d88 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties index 7964a240ae..ab678e4d88 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/thermophysicalProperties @@ -17,7 +17,7 @@ FoamFile thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties index 4c4cce2da7..55b50fd4b4 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRoom/constant/thermophysicalProperties @@ -15,11 +15,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// thermoType hePsiThermo>,sensibleEnthalpy>>>; - thermoType { - type hePsiThermo; + type heRhoThermo; mixture pureMixture; transport const; thermo hConst; From b3d5349edb2747c888a895e4bbea77baa3930240 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 1 Feb 2013 16:29:07 +0000 Subject: [PATCH 07/12] ENH: Updated cloud penetration calc --- .../KinematicCloud/KinematicCloudI.H | 131 ++++++++++-------- 1 file changed, 74 insertions(+), 57 deletions(-) diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index be67f18292..68acada6ca 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -372,8 +372,14 @@ inline Foam::scalar Foam::KinematicCloud::penetration } // lists of parcels mass and distance from initial injection point - List mass(nParcel, 0.0); - List dist(nParcel, 0.0); + List > procMass(Pstream::nProcs()); + List > procDist(Pstream::nProcs()); + + List& mass = procMass[Pstream::myProcNo()]; + List& dist = procDist[Pstream::myProcNo()]; + + mass.setSize(nParcel); + dist.setSize(nParcel); label i = 0; scalar mSum = 0.0; @@ -392,75 +398,86 @@ inline Foam::scalar Foam::KinematicCloud::penetration // calculate total mass across all processors reduce(mSum, sumOp()); + Pstream::gatherList(procMass); + Pstream::gatherList(procDist); - // flatten the mass list - List allMass(nParcelSum, 0.0); - SubList - ( - allMass, - globalParcels.localSize(Pstream::myProcNo()), - globalParcels.offset(Pstream::myProcNo()) - ).assign(mass); - - // flatten the distance list - SortableList allDist(nParcelSum, 0.0); - SubList - ( - allDist, - globalParcels.localSize(Pstream::myProcNo()), - globalParcels.offset(Pstream::myProcNo()) - ).assign(dist); - - // sort allDist distances into ascending order - // note: allMass masses are left unsorted - allDist.sort(); - - if (nParcelSum > 1) + if (Pstream::master()) { - const scalar mLimit = fraction*mSum; - const labelList& indices = allDist.indices(); - - if (mLimit > (mSum - allMass[indices.last()])) + // flatten the mass lists + List allMass(nParcelSum, 0.0); + SortableList allDist(nParcelSum, 0.0); + for (label procI = 0; procI < Pstream::nProcs(); procI++) { - distance = allDist.last(); + SubList + ( + allMass, + globalParcels.localSize(procI), + globalParcels.offset(procI) + ).assign(procMass[procI]); + + // flatten the distance list + SubList + ( + allDist, + globalParcels.localSize(procI), + globalParcels.offset(procI) + ).assign(procDist[procI]); } - else + + // sort allDist distances into ascending order + // note: allMass masses are left unsorted + allDist.sort(); + + if (nParcelSum > 1) { - // assuming that 'fraction' is generally closer to 1 than 0, loop - // through in reverse distance order - const scalar mThreshold = (1.0 - fraction)*mSum; - scalar mCurrent = 0.0; - label i0 = 0; + const scalar mLimit = fraction*mSum; + const labelList& indices = allDist.indices(); - forAllReverse(indices, i) - { - label indI = indices[i]; - - mCurrent += allMass[indI]; - - if (mCurrent > mThreshold) - { - i0 = i; - break; - } - } - - if (i0 == indices.size() - 1) + if (mLimit > (mSum - allMass[indices.last()])) { distance = allDist.last(); } else { - // linearly interpolate to determine distance - scalar alpha = (mCurrent - mThreshold)/allMass[indices[i0]]; - distance = allDist[i0] + alpha*(allDist[i0+1] - allDist[i0]); + // assuming that 'fraction' is generally closer to 1 than 0, + // loop through in reverse distance order + const scalar mThreshold = (1.0 - fraction)*mSum; + scalar mCurrent = 0.0; + label i0 = 0; + + forAllReverse(indices, i) + { + label indI = indices[i]; + + mCurrent += allMass[indI]; + + if (mCurrent > mThreshold) + { + i0 = i; + break; + } + } + + if (i0 == indices.size() - 1) + { + distance = allDist.last(); + } + else + { + // linearly interpolate to determine distance + scalar alpha = (mCurrent - mThreshold)/allMass[indices[i0]]; + distance = + allDist[i0] + alpha*(allDist[i0+1] - allDist[i0]); + } } } + else + { + distance = allDist.first(); + } } - else - { - distance = allDist.first(); - } + + Pstream::scatter(distance); return distance; } From eedaa820e249aa699ab00990f7b9c85b6e025dd5 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 1 Feb 2013 16:32:04 +0000 Subject: [PATCH 08/12] ENH: Updated sprayFoam Aachen bomb test case --- .../sprayFoam/aachenBomb/constant/chemistryProperties | 2 +- .../sprayFoam/aachenBomb/constant/combustionProperties | 4 ++-- .../sprayFoam/aachenBomb/constant/thermophysicalProperties | 4 +++- tutorials/lagrangian/sprayFoam/aachenBomb/system/controlDict | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties index deb5491013..ea16d954f1 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/chemistryProperties @@ -21,7 +21,7 @@ chemistryType chemistryThermo psi; } -chemistry off; +chemistry on; initialChemicalTimeStep 1e-07; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties index 8f326f3667..f7b1cae9b7 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/combustionProperties @@ -15,9 +15,9 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -combustionModel PaSR; +combustionModel PaSR; -active false; +active yes; PaSRCoeffs { diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties index b0ac29548b..ebae047d0b 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/thermophysicalProperties @@ -28,7 +28,9 @@ thermoType CHEMKINFile "$FOAM_CASE/chemkin/chem.inp"; -CHEMKINThermoFile "~OpenFOAM/thermoData/therm.dat"; +CHEMKINThermoFile "$FOAM_CASE/chemkin/therm.dat"; + +newFormat yes; inertSpecie N2; diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/system/controlDict b/tutorials/lagrangian/sprayFoam/aachenBomb/system/controlDict index 89dc909c58..7c512bc41b 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/system/controlDict +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/system/controlDict @@ -8,7 +8,7 @@ FoamFile { version 2.0; - format binary; + format ascii; class dictionary; location "system"; object controlDict; From 17e203992098ab929b568388a339b26140e0f0bc Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 1 Feb 2013 16:38:52 +0000 Subject: [PATCH 09/12] ENH: Added option to read new chemkin format --- .../chemkinToFoam/chemkinToFoam.C | 13 +++++++++-- .../chemkinReader/chemkinLexer.L | 23 +++++++++++-------- .../chemkinReader/chemkinReader.C | 16 +++++++++---- .../chemkinReader/chemkinReader.H | 9 ++++++-- 4 files changed, 44 insertions(+), 17 deletions(-) diff --git a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C index 2f56ee07de..f844195ae9 100644 --- a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C +++ b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C @@ -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) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,11 +42,20 @@ int main(int argc, char *argv[]) argList::validArgs.append("CHEMKINThermodynamicsFile"); argList::validArgs.append("FOAMChemistryFile"); argList::validArgs.append("FOAMThermodynamicsFile"); + + argList::addBoolOption + ( + "newFormat", + "read Chemkin thermo file in new format" + ); + argList args(argc, argv); + bool newFormat = args.optionFound("newFormat"); + speciesTable species; - chemkinReader cr(args[1], species, args[2]); + chemkinReader cr(args[1], species, args[2], newFormat); OFstream reactionsFile(args[3]); reactionsFile diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index 678300a172..6db89e7a69 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -439,20 +439,25 @@ bool finishReaction = false; {thermoSpecieName} { string specieString(foamSpecieString(YYText())); - // Old format - size_t spacePos = specieString.find(' '); - if (spacePos != string::npos) + if (newFormat_) { - currentSpecieName = specieString(0, spacePos); + specieString.replaceAll(" ", "_"); + size_t strEnd = specieString.find_last_not_of('_'); + currentSpecieName = specieString.substr(0, strEnd + 1); } else { - currentSpecieName = specieString; + size_t spacePos = specieString.find(' '); + if (spacePos != string::npos) + { + currentSpecieName = specieString(0, spacePos); + } + else + { + currentSpecieName = specieString; + } } - // New format - // specieString.replaceAll(" ", "_"); - // size_t strEnd = specieString.find_last_not_of('_'); - // currentSpecieName = specieString.substr(0, strEnd + 1); + BEGIN(readThermoDate); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C index 5ee2a03ac3..63dd057f3d 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -862,13 +862,15 @@ Foam::chemkinReader::chemkinReader ( const fileName& CHEMKINFileName, speciesTable& species, - const fileName& thermoFileName + const fileName& thermoFileName, + const bool newFormat ) : lineNo_(1), specieNames_(10), speciesTable_(species), - reactions_(speciesTable_, speciesThermo_) + reactions_(speciesTable_, speciesThermo_), + newFormat_(newFormat) { read(CHEMKINFileName, thermoFileName); } @@ -883,8 +885,14 @@ Foam::chemkinReader::chemkinReader lineNo_(1), specieNames_(10), speciesTable_(species), - reactions_(speciesTable_, speciesThermo_) + reactions_(speciesTable_, speciesThermo_), + newFormat_(thermoDict.lookupOrDefault("newFormat", false)) { + if (newFormat_) + { + Info<< "Reading CHEMKIN thermo data in new file format" << endl; + } + fileName chemkinFile(fileName(thermoDict.lookup("CHEMKINFile")).expand()); fileName thermoFile = fileName::null; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H index 4cd84f59a5..ad1c50abd8 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,6 +39,7 @@ SourceFiles #include "chemistryReader.H" #include "fileName.H" #include "typeInfo.H" +#include "Switch.H" #include "HashPtrTable.H" #include "ReactionList.H" #include "DynamicList.H" @@ -207,6 +208,9 @@ private: //- List of the reactions ReactionList reactions_; + //- Flag to indicate that file is in new format + Switch newFormat_; + // Private Member Functions @@ -319,7 +323,8 @@ public: ( const fileName& chemkinFile, speciesTable& species, - const fileName& thermoFileName = fileName::null + const fileName& thermoFileName = fileName::null, + const bool newFormat = false ); //- Construct by getting the CHEMKIN III file name from dictionary From 6087206cbe4190f41f85d7c7b1df6e83ebb4ddcf Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 7 Feb 2013 09:59:00 +0000 Subject: [PATCH 10/12] ENH: ENH: Updated minimum Gcc version to 4.5 --- etc/config/settings.csh | 13 +------------ etc/config/settings.sh | 16 ---------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/etc/config/settings.csh b/etc/config/settings.csh index 27ad49aea8..be510764fd 100644 --- a/etc/config/settings.csh +++ b/etc/config/settings.csh @@ -219,7 +219,7 @@ case ThirdParty: case Gcc++0x: case Gcc46: case Gcc46++0x: - set gcc_version=gcc-4.6.2 + set gcc_version=gcc-4.6.1 set gmp_version=gmp-5.0.4 set mpfr_version=mpfr-3.1.0 set mpc_version=mpc-0.9 @@ -238,17 +238,6 @@ case ThirdParty: set mpfr_version=mpfr-2.4.2 set mpc_version=mpc-0.8.1 breaksw - case Gcc44: - case Gcc44++0x: - set gcc_version=gcc-4.4.3 - set gmp_version=gmp-5.0.1 - set mpfr_version=mpfr-2.4.2 - breaksw - case Gcc43: - set gcc_version=gcc-4.3.3 - set gmp_version=gmp-4.2.4 - set mpfr_version=mpfr-2.4.1 - breaksw case Clang: # using clang - not gcc setenv WM_CC 'clang' diff --git a/etc/config/settings.sh b/etc/config/settings.sh index ad336dd871..12d6f4b900 100644 --- a/etc/config/settings.sh +++ b/etc/config/settings.sh @@ -240,12 +240,6 @@ fi case "${foamCompiler}" in OpenFOAM | ThirdParty) case "$WM_COMPILER" in - Gcc463) - gcc_version=gcc-4.6.3 - gmp_version=gmp-5.0.2 - mpfr_version=mpfr-3.0.1 - mpc_version=mpc-0.9 - ;; Gcc | Gcc++0x | Gcc46 | Gcc46++0x) gcc_version=gcc-4.6.1 gmp_version=gmp-5.0.4 @@ -264,16 +258,6 @@ OpenFOAM | ThirdParty) mpfr_version=mpfr-2.4.2 mpc_version=mpc-0.8.1 ;; - Gcc44 | Gcc44++0x) - gcc_version=gcc-4.4.3 - gmp_version=gmp-5.0.1 - mpfr_version=mpfr-2.4.2 - ;; - Gcc43) - gcc_version=gcc-4.3.3 - gmp_version=gmp-4.2.4 - mpfr_version=mpfr-2.4.1 - ;; Clang) # using clang - not gcc export WM_CC='clang' From 29b74534c7c6b2779b2e2b1d643a693e9f092a06 Mon Sep 17 00:00:00 2001 From: andy Date: Thu, 7 Feb 2013 10:00:40 +0000 Subject: [PATCH 11/12] STYLE: Updated tutorial header --- .../buoyantSimpleFoam/buoyantCavity/system/fvSolution | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution index cd216b7fc2..b19527e0ce 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/buoyantCavity/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.2.0 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ From 20cfa7c6aefe1550914c70b7231c2b60303e238f Mon Sep 17 00:00:00 2001 From: sergio Date: Thu, 7 Feb 2013 11:32:40 +0000 Subject: [PATCH 12/12] BUG: Correcting axesRotation.C virtual member functions and tutorials using coordinates systems dictionary --- .../coordinateRotation/axesRotation.C | 14 ++------- .../angledDuct/system/fvOptions | 10 +++++-- .../iglooWithFridges/system/snappyHexMeshDict | 30 ++++++++++++++----- .../heatExchanger/system/air/fvOptions | 10 +++++-- 4 files changed, 40 insertions(+), 24 deletions(-) diff --git a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C index 039e3fb253..a502eb02fd 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/axesRotation.C @@ -171,12 +171,7 @@ Foam::tmp Foam::axesRotation::transform const vectorField& st ) const { - notImplemented - ( - "tmp Foam::axesRotation:: " - "transform(const vectorField& st) const" - ); - return tmp(NULL); + return (R_ & st); } @@ -185,12 +180,7 @@ Foam::tmp Foam::axesRotation::invTransform const vectorField& st ) const { - notImplemented - ( - "tmp Foam::axesRotation::" - "invTransform(const vectorField& st) const" - ); - return tmp(NULL); + return (Rtr_ & st); } diff --git a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions index b150d51b8f..66a2b80752 100644 --- a/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions +++ b/tutorials/compressible/rhoPimplecFoam/angledDuct/system/fvOptions @@ -33,8 +33,14 @@ porosity1 coordinateSystem { - e1 (0.70710678 0.70710678 0); - e3 (0 0 1); + type cartesian; + origin (0 0 0); + coordinateRotation + { + type axesRotation; + e1 (0.70710678 0.70710678 0); + e3 (0 0 1); + } } } } diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict index c5e80f8d1a..a6e206d525 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict @@ -54,10 +54,17 @@ geometry scale (1.0 1.0 2.1); transform { - type cartesian; - origin (2 2 0); - e1 (1 0 0); - e3 (0 0 1); + coordinateSystem + { + type cartesian; + origin (2 2 0); + coordinateRotation + { + type axesRotation; + e1 (1 0 0); + e3 (0 0 1); + } + } } } herring @@ -66,10 +73,17 @@ geometry scale (1.0 1.0 2.1); transform { - type cartesian; - origin (3.5 3 0); - e1 (1 0 0); - e3 (0 0 1); + coordinateSystem + { + type cartesian; + origin (3.5 3 0); + coordinateRotation + { + type axesRotation; + e1 (1 0 0); + e3 (0 0 1); + } + } } } } diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions index 475ac8e040..e0562a3851 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger/system/air/fvOptions @@ -51,8 +51,14 @@ porosityBlockage coordinateSystem { - e1 (0 1 0); - e2 (0 0 1); + type cartesian; + origin (0 0 0); + coordinateRotation + { + type axesRotation; + e1 (0 1 0); + e2 (0 0 1); + } } } }