diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 5f25016a84..a428253421 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -165,7 +165,6 @@ int main(int argc, char *argv[]) mesh.movePoints(motionPtr->newPoints()); phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg; - Info<< phi.boundaryField()[0] << endl; surfaceVectorField phiUp ( diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H index b64277749e..b9a47a917d 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/EEqns.H @@ -19,34 +19,46 @@ fvScalarMatrix he1Eqn ( - fvm::ddt(alpha1, he1) - + fvm::div(alphaPhi1, he1) + fvm::ddt(alpha1, he1) + fvm::div(alphaPhi1, he1) + + fvc::ddt(alpha1, K1) + fvc::div(alphaPhi1, K1) // Compressibity correction - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), he1) + - (fvc::ddt(alpha1) + fvc::div(alphaPhi1))*K1 + + + ( + he1.name() == "e" + ? fvc::div(alphaPhi1, p) + : -dalpha1pdt + )/rho1 - fvm::laplacian(k1, he1) == heatTransferCoeff*(thermo2.T() - thermo1.T())/rho1 + heatTransferCoeff*he1/Cpv1/rho1 - fvm::Sp(heatTransferCoeff/Cpv1/rho1, he1) - + alpha1*(dpdt/rho1 - (fvc::ddt(K1) + fvc::div(phi1, K1))) ); fvScalarMatrix he2Eqn ( - fvm::ddt(alpha2, he2) - + fvm::div(alphaPhi2, he2) + fvm::ddt(alpha2, he2) + fvm::div(alphaPhi2, he2) + + fvc::ddt(alpha2, K2) + fvc::div(alphaPhi2, K2) // Compressibity correction - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), he2) + - (fvc::ddt(alpha2) + fvc::div(alphaPhi2))*K2 + + + ( + he2.name() == "e" + ? fvc::div(alphaPhi2, p) + : -dalpha2pdt + )/rho2 - fvm::laplacian(k2, he2) == heatTransferCoeff*(thermo1.T() - thermo2.T())/rho2 + heatTransferCoeff*he2/Cpv2/rho2 - fvm::Sp(heatTransferCoeff/Cpv2/rho2, he2) - + alpha2*(dpdt/rho2 - (fvc::ddt(K2) + fvc::div(phi2, K2))) ); he1Eqn.relax(); diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H index cf19664d85..54a61f51d2 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/createFields.H @@ -275,8 +275,8 @@ ); - Info<< "Creating field dpdt\n" << endl; - volScalarField dpdt + Info<< "Creating field dalpha1pdt\n" << endl; + volScalarField dalpha1pdt ( IOobject ( @@ -285,7 +285,20 @@ mesh ), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + dimensionedScalar("dalpha1pdt", p.dimensions()/dimTime, 0) + ); + + Info<< "Creating field dalpha2pdt\n" << endl; + volScalarField dalpha2pdt + ( + IOobject + ( + "dpdt", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dalpha2pdt", p.dimensions()/dimTime, 0) ); Info<< "Creating field kinetic energy K\n" << endl; diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index f9a7807d00..bf75b28d05 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -192,6 +192,11 @@ if (thermo1.dpdt()) { - dpdt = fvc::ddt(p); + dalpha1pdt = fvc::ddt(alpha1, p); + } + + if (thermo2.dpdt()) + { + dalpha2pdt = fvc::ddt(alpha2, p); } } diff --git a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H index 32aaa246a7..33b0314cef 100644 --- a/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H +++ b/src/finiteVolume/cfdTools/general/SRF/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,7 +31,7 @@ Description Velocity condition to be used in conjunction with the single rotating frame (SRF) model (see: SRFModel class) - Given the free stream velocity in the absolute frame, the condition + Given the free stream velocity in the absolute frame, the condition applies the appropriate rotation transformation in time and space to determine the local velocity. @@ -62,8 +62,8 @@ Description \table Property | Description | Required | Default value - relative | relative motion to the SRF? | yes | inletValue | inlet velocity | yes | + relative | inletValue relative motion to the SRF? | yes | \endtable Example of the boundary condition specification: @@ -71,8 +71,8 @@ Description myPatch { type SRFVelocity; - relative yes; inletValue uniform (0 0 0); + relative yes; value uniform (0 0 0); // initial value } \endverbatim diff --git a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H index adcb570f93..057c667b7b 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/freestream/freestreamFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -37,6 +37,7 @@ Description \table Property | Description | Required | Default value + freestreamValue | freestream velocity | yes | phi | flux field name | no | phi \endtable diff --git a/src/fvOptions/Make/files b/src/fvOptions/Make/files index 23fdf0282f..1cae70c312 100644 --- a/src/fvOptions/Make/files +++ b/src/fvOptions/Make/files @@ -27,6 +27,7 @@ $(derivedSources)/rotorDiskSource/trimModel/trimModel/trimModel.C $(derivedSources)/rotorDiskSource/trimModel/trimModel/trimModelNew.C $(derivedSources)/rotorDiskSource/trimModel/fixed/fixedTrim.C $(derivedSources)/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C +$(derivedSources)/heatExchangerSource/heatExchangerSource.C interRegion = sources/interRegion $(interRegion)/interRegionHeatTransferModel/constantHeatTransfer/constantHeatTransfer.C @@ -36,6 +37,7 @@ $(interRegion)/interRegionHeatTransferModel/variableHeatTransfer/variableHeatTra $(interRegion)/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C + /* constraints */ generalConstraints=constraints/general diff --git a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C new file mode 100644 index 0000000000..7c4c072067 --- /dev/null +++ b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.C @@ -0,0 +1,338 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013-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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*----------------------------------------------------------------------------*/ + +#include "heatExchangerSource.H" +#include "fvMesh.H" +#include "fvMatrix.H" +#include "addToRunTimeSelectionTable.H" +#include "basicThermo.H" +#include "coupledPolyPatch.H" +#include "surfaceInterpolate.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace fv +{ + defineTypeNameAndDebug(heatExchangerSource, 0); + addToRunTimeSelectionTable + ( + option, + heatExchangerSource, + dictionary + ); +} +} + + +// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::fv::heatExchangerSource::init() +{ + const faceZone& fZone = mesh_.faceZones()[zoneID_]; + + faceId_.setSize(fZone.size()); + facePatchId_.setSize(fZone.size()); + faceSign_.setSize(fZone.size()); + + label count = 0; + forAll(fZone, i) + { + label faceI = fZone[i]; + label faceId = -1; + label facePatchId = -1; + if (mesh_.isInternalFace(faceI)) + { + faceId = faceI; + facePatchId = -1; + } + else + { + facePatchId = mesh_.boundaryMesh().whichPatch(faceI); + const polyPatch& pp = mesh_.boundaryMesh()[facePatchId]; + if (isA(pp)) + { + if (refCast(pp).owner()) + { + faceId = pp.whichFace(faceI); + } + else + { + faceId = -1; + } + } + else if (!isA(pp)) + { + faceId = faceI - pp.start(); + } + else + { + faceId = -1; + facePatchId = -1; + } + } + + if (faceId >= 0) + { + if (fZone.flipMap()[i]) + { + faceSign_[count] = -1; + } + else + { + faceSign_[count] = 1; + } + faceId_[count] = faceId; + facePatchId_[count] = facePatchId; + count++; + } + } + faceId_.setSize(count); + facePatchId_.setSize(count); + faceSign_.setSize(count); + + calculateTotalArea(faceZoneArea_); +} + + +void Foam::fv::heatExchangerSource::addHeatSource +( + scalarField& heSource, + const labelList& cells, + const scalarField& Vcells, + const vectorField& U, + const scalar Qt, + const scalarField& deltaTCells, + const scalar totHeat +) const +{ + forAll(cells, i) + { + heSource[cells[i]] -= + Qt*Vcells[cells[i]]*mag(U[cells[i]])*deltaTCells[i]/totHeat; + } +} + + +void Foam::fv::heatExchangerSource::calculateTotalArea(scalar& var) +{ + var = 0; + forAll(faceId_, i) + { + label faceI = faceId_[i]; + if (facePatchId_[i] != -1) + { + label patchI = facePatchId_[i]; + var += mesh_.magSf().boundaryField()[patchI][faceI]; + } + else + { + var += mesh_.magSf()[faceI]; + } + } + reduce(var, sumOp()); +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::fv::heatExchangerSource::heatExchangerSource +( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh +) +: + option(name, modelType, dict, mesh), + secondaryMassFlowRate_(readScalar(coeffs_.lookup("secondaryMassFlowRate"))), + secondaryInletT_(readScalar(coeffs_.lookup("secondaryInletT"))), + primaryInletT_(readScalar(coeffs_.lookup("primaryInletT"))), + eTable_(), + UName_(coeffs_.lookupOrDefault("UName", "U")), + TName_(coeffs_.lookupOrDefault("TName", "T")), + phiName_(coeffs_.lookupOrDefault("phiName", "phi")), + faceZoneName_(coeffs_.lookup("faceZone")), + zoneID_(mesh_.faceZones().findZoneID(faceZoneName_)), + faceId_(), + facePatchId_(), + faceSign_(), + faceZoneArea_(0) +{ + + if (zoneID_ < 0) + { + FatalErrorIn + ( + "heatExchangerSource::heatExchangerSource" + "(" + " const word& name," + " const word& modelType," + " const dictionary& dict," + " const fvMesh& mesh" + ")" + ) + << type() << " " << this->name() << ": " + << " Unknown face zone name: " << faceZoneName_ + << ". Valid face zones are: " << mesh_.faceZones().names() + << nl << exit(FatalError); + } + + coeffs_.lookup("fieldNames") >> fieldNames_; + applied_.setSize(fieldNames_.size(), false); + + eTable_.reset(new interpolation2DTable(coeffs_)); + + init(); + + Info<< " - creating heatExchangerSource: " + << this->name() << endl; +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::fv::heatExchangerSource::addSup +( + fvMatrix& eqn, + const label +) +{ + const basicThermo& thermo = + mesh_.lookupObject("thermophysicalProperties"); + + const surfaceScalarField Cpf = fvc::interpolate(thermo.Cp()); + + const surfaceScalarField& phi = + mesh_.lookupObject(phiName_); + + scalar totalphi = 0; + scalar CpfMean = 0; + forAll(faceId_, i) + { + label faceI = faceId_[i]; + if (facePatchId_[i] != -1) + { + label patchI = facePatchId_[i]; + totalphi += phi.boundaryField()[patchI][faceI]*faceSign_[i]; + + CpfMean += + Cpf.boundaryField()[patchI][faceI] + * mesh_.magSf().boundaryField()[patchI][faceI]; + } + else + { + totalphi += phi[faceI]*faceSign_[i]; + CpfMean += Cpf[faceI]*mesh_.magSf()[faceI]; + } + } + reduce(CpfMean, sumOp()); + reduce(totalphi, sumOp()); + + scalar Qt = + eTable_()(mag(totalphi), secondaryMassFlowRate_) + * (secondaryInletT_ - primaryInletT_) + * (CpfMean/faceZoneArea_)*mag(totalphi); + + const volScalarField& T = mesh_.lookupObject(TName_); + const scalarField TCells(T, cells_); + scalar Tref = 0; + if (Qt > 0) + { + Tref = max(TCells); + reduce(Tref, maxOp()); + } + else + { + Tref = min(TCells); + reduce(Tref, minOp()); + } + + scalarField deltaTCells(cells_.size(), 0); + forAll(deltaTCells, i) + { + if (Qt > 0) + { + deltaTCells[i] = max(Tref - TCells[i], 0.0); + } + else + { + deltaTCells[i] = max(TCells[i] - Tref, 0.0); + } + } + + const volVectorField& U = mesh_.lookupObject(UName_); + const scalarField& cellsV = mesh_.V(); + scalar totHeat = 0; + forAll(cells_, i) + { + totHeat += cellsV[cells_[i]]*mag(U[cells_[i]])*deltaTCells[i]; + } + reduce(totHeat, sumOp()); + + scalarField& heSource = eqn.source(); + + if (V() > VSMALL && mag(Qt) > VSMALL) + { + addHeatSource(heSource, cells_, cellsV, U, Qt, deltaTCells, totHeat); + } + + if (debug && Pstream::master()) + { + Info<< indent << "Net mass flux [Kg/s] = " << totalphi << nl; + Info<< indent << "Total energy exchange [W] = " << Qt << nl; + Info<< indent << "Tref [K] = " << Tref << nl; + Info<< indent << "Efficiency : " + << eTable_()(mag(totalphi), secondaryMassFlowRate_) << endl; + } +} + + +void Foam::fv::heatExchangerSource::writeData(Ostream& os) const +{ + os << indent << name_ << endl; + dict_.write(os); +} + + +bool Foam::fv::heatExchangerSource::read(const dictionary& dict) +{ + if (option::read(dict)) + { + coeffs_.lookup("secondaryMassFlowRate") >> secondaryMassFlowRate_; + coeffs_.lookup("secondaryInletT") >> secondaryInletT_; + coeffs_.lookup("primaryInletT") >> primaryInletT_; + + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H new file mode 100644 index 0000000000..6194bdfb62 --- /dev/null +++ b/src/fvOptions/sources/derived/heatExchangerSource/heatExchangerSource.H @@ -0,0 +1,237 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013-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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::fv::heatExchangerSource + +Description + Heat exchanger source model. + The total heat exchange is given by: + + Qt = e(phi, secondaryMassFlowRate) + * (secondaryInletT - primaryInletT) + * phi*Cp; + + where: + e(phi, secondaryMassFlowRate) is a effectivenes table in function of + mass net flux coming imto the heat exchanger (phi) and + secondaryMassFlowRate + + Then the distribution inside the hear exchanger is given by: + + Qcell = V*Ucell*(Tcell - Tref)/sum(V*Ucell*(Tcell - Tref)); + + where: + Qcell is the source for cell + V is the volume of the cell + Ucell is the local cell velocity + Tcell is the local call temperature + Tref : min(T) or max(T) in the cell zone depending on the sign of Qt + + Example : + + heatExchangerSource1 + { + type heatExchangerSource; + active true; + selectionMode cellZone; + cellZone porosity; + + heatExchangerSourceCoeffs + { + fieldNames (e); + secondaryMassFlowRate 1.0; + secondaryInletT 336; + primaryInletT 293; + faceZone facesZoneInletOriented; + outOfBounds clamp; + fileName "effTable"; + } + } + + Note: + the table with name "fileName" should have the same units as + secondaryMassFlowRate and kg/s for phi + faceZone is the faces at the inlet of the cellzone, it needs to be + created with flip map flags. It is used to integrate the net mass flow + rate into the heat exchanger + + +SourceFiles + heatExchangerSource.C + +\*---------------------------------------------------------------------------*/ + +#ifndef heatExchangerSource_H +#define heatExchangerSource_H + +#include "fvOption.H" +#include "autoPtr.H" +#include "interpolation2DTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace fv +{ + +/*---------------------------------------------------------------------------*\ + Class heatExchangerSource Declaration +\*---------------------------------------------------------------------------*/ + +class heatExchangerSource +: + public option +{ + +protected: + + // Protected data + + //- Secondary flow mass rate [Kg/s] + scalar secondaryMassFlowRate_; + + //- Inlet secondary temperature [K] + scalar secondaryInletT_; + + //- Primary air temperature at the heat exchanger inlet [K] + scalar primaryInletT_; + + //- 2D look up table efficiency = F(total primary mass flow rate [Kg/s] + //, secondary mass flow rate [Kg/s]) + autoPtr > eTable_; + + //- Name of velocity field; default = U + word UName_; + + //- Name of temperature field; default = T + word TName_; + + //- Name of the flux + word phiName_; + + //- Name of the faceZone at the heat exchange inlet + word faceZoneName_; + + //- Id for the face zone + label zoneID_; + + //- Local list of face IDs + labelList faceId_; + + //- Local list of patch ID per face + labelList facePatchId_; + + //- List of +1/-1 representing face flip map + // (1 use as is, -1 negate) + labelList faceSign_; + + //- Area of the face zone + scalar faceZoneArea_; + + +private: + + // Private Member Functions + + + //- Disallow default bitwise copy construct + heatExchangerSource(const heatExchangerSource&); + + //- Disallow default bitwise assignment + void operator=(const heatExchangerSource&); + + //- Add heat source + void addHeatSource + ( + scalarField& Tsource, + const labelList& cells, + const scalarField& V, + const vectorField& U, + const scalar Qt, + const scalarField& deltaTref, + const scalar totalHeat + ) const; + + //- Init heat exchanger source model + void init(); + + //- Calculate total area of faceZone accross procesors + void calculateTotalArea(scalar& var); + + + +public: + + //- Runtime type information + TypeName("heatExchangerSource"); + + + // Constructors + + //- Construct from components + heatExchangerSource + ( + const word& name, + const word& modelType, + const dictionary& dict, + const fvMesh& mesh + ); + + + //- Destructor + virtual ~heatExchangerSource() + {} + + + // Member Functions + + + // Public Functions + + //- Source term to fvMatrix + virtual void addSup(fvMatrix& eqn, const label fieldI); + + + // I-O + + //- Write data + virtual void writeData(Ostream&) const; + + //- Read dictionary + virtual bool read(const dictionary& dict); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace fv +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H index ff2f3e233d..ffa133f701 100644 --- a/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/incompressiblePerfectGas/incompressiblePerfectGasI.H @@ -121,7 +121,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas::psi scalar T ) const { - return 1.0/(this->R()*T); + return 0.0; } @@ -132,7 +132,7 @@ inline Foam::scalar Foam::incompressiblePerfectGas::Z scalar ) const { - return 1.0; + return 0.0; } diff --git a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict index 544288617f..f70ad3e89b 100644 --- a/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict +++ b/tutorials/incompressible/pimpleFoam/TJunctionFan/system/createBafflesDict @@ -81,11 +81,8 @@ baffles } slave { - //- Slave side patch - name baffles; - type wall; - - ${..master.patchFields} + // Reuse master data + ${..master} } } } diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater index 43cb59fafa..672b24a98b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/constant/thermophysicalPropertieswater @@ -31,12 +31,11 @@ mixture specie { nMoles 1; - molWeight 18; + molWeight 28.9; } equationOfState { rho0 1027; - R 3000; } thermodynamics { diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes index 1851801037..3335348f05 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/bubbleColumn/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes "div\(phid.*,p\)" Gauss upwind; "div\(alphaPhi.*,h.*\)" Gauss limitedLinear 1; - "div\(phi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,K.*\)" Gauss limitedLinear 1; "div\(alphaPhi.*,(k|epsilon)\)" Gauss limitedLinear 1; } diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 index 94e852ea58..0ac5f83a42 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties1 @@ -23,7 +23,7 @@ thermoType thermo hConst; equationOfState rhoConst; specie specie; - energy sensibleEnthalpy; + energy sensibleInternalEnergy; } mixture diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 index 11c033af59..e61009c10b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/constant/thermophysicalProperties2 @@ -23,7 +23,7 @@ thermoType thermo hConst; equationOfState perfectGas; specie specie; - energy sensibleEnthalpy; + energy sensibleInternalEnergy; } mixture diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes index 8799476cc7..c69e87c4fb 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSchemes @@ -37,8 +37,8 @@ divSchemes "div\(\(alpha.*Rc\)\)" Gauss linear; "div\(phid.,p\)" Gauss upwind; - "div\(alphaPhi.,h.\)" Gauss limitedLinear 1; - "div\(phi.,K.\)" Gauss limitedLinear 1; + "div\(alphaPhi.,(h|e).\)" Gauss limitedLinear 1; + "div\(alphaPhi.,K.\)" Gauss limitedLinear 1; div(alphaPhi2,k) Gauss limitedLinear 1; div(alphaPhi2,epsilon) Gauss limitedLinear 1; diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution index 1c5fdb8117..a2906e9722 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/fluidisedBed/system/fvSolution @@ -47,7 +47,7 @@ solvers relTol 0; } - "h.*" + "(h|e).*" { solver PBiCG; preconditioner DILU; diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 index 43cb59fafa..672b24a98b 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/constant/thermophysicalProperties2 @@ -31,12 +31,11 @@ mixture specie { nMoles 1; - molWeight 18; + molWeight 28.9; } equationOfState { rho0 1027; - R 3000; } thermodynamics { diff --git a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes index c88d130244..6af6a5df12 100644 --- a/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleTwoPhaseEulerFoam/mixerVessel2D/system/fvSchemes @@ -38,7 +38,7 @@ divSchemes "div\(phid.,p\)" Gauss linear; "div\(alphaPhi.,h.\)" Gauss limitedLinear 1; - "div\(phi.,K.\)" Gauss linear; + "div\(alphaPhi.,K.\)" Gauss limitedLinear 1; "div\(alphaPhi.,(k|epsilon)\)" Gauss limitedLinear 1; }