diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C index 4730621e08..5bba2ff062 100644 --- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C +++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C @@ -47,14 +47,15 @@ extrudePatchMesh::extrudePatchMesh ( const fvMesh& mesh, const fvPatch& patch, - const dictionary& dict + const dictionary& dict, + const word regionName ) : fvMesh ( IOobject ( - dict.lookup("region"), + regionName, mesh.facesInstance(), mesh, IOobject::READ_IF_PRESENT, diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H index b960988e20..0ced75eec6 100644 --- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.H +++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.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 @@ -25,12 +25,11 @@ Class extrudePatchMesh Description - Mesh at a patch created on the fly. The following entried should be used + Mesh at a patch created on the fly. The following entry should be used on the field boundary dictionary: // New Shell mesh data - region "regionMesh"; extrudeModel linearNormal; linearNormalCoeffs { @@ -120,7 +119,8 @@ public: ( const fvMesh&, const fvPatch&, - const dictionary& + const dictionary&, + const word ); diff --git a/src/regionModels/thermalBaffleModels/Make/options b/src/regionModels/thermalBaffleModels/Make/options index 21a54595be..3480df7872 100644 --- a/src/regionModels/thermalBaffleModels/Make/options +++ b/src/regionModels/thermalBaffleModels/Make/options @@ -7,7 +7,9 @@ EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/mesh/extrudeModel/lnInclude LIB_LIBS = \ -lregionModels \ @@ -16,4 +18,5 @@ LIB_LIBS = \ -lfiniteVolume \ -lmeshTools \ -lOpenFOAM \ - -lradiationModels + -lradiationModels \ + -ldynamicMesh diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index 60b418053b..027336f2e6 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -45,7 +45,8 @@ thermalBaffleFvPatchScalarField turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF), owner_(false), baffle_(), - dict_(dictionary::null) + dict_(dictionary::null), + extrudeMeshPtr_() {} @@ -66,8 +67,9 @@ thermalBaffleFvPatchScalarField mapper ), owner_(ptf.owner_), - baffle_(ptf.baffle_), - dict_(ptf.dict_) + baffle_(), + dict_(ptf.dict_), + extrudeMeshPtr_() {} @@ -82,47 +84,47 @@ thermalBaffleFvPatchScalarField turbulentTemperatureRadCoupledMixedFvPatchScalarField(p, iF, dict), owner_(false), baffle_(), - dict_(dict) + dict_(dict), + extrudeMeshPtr_() { - if (!isA(patch().patch())) - { - FatalErrorIn - ( - "thermalBaffleFvPatchScalarField::" - "thermalBaffleFvPatchScalarField\n" - "(\n" - " const fvPatch& p,\n" - " const DimensionedField& iF,\n" - " const dictionary& dict\n" - ")\n" - ) << "\n patch type '" << patch().type() - << "' not type '" << mappedPatchBase::typeName << "'" - << "\n for patch " << patch().name() - << " of field " << dimensionedInternalField().name() - << " in file " << dimensionedInternalField().objectPath() - << exit(FatalError); - } - - const mappedPatchBase& mpp = - refCast(patch().patch()); - - const word nbrMesh = mpp.sampleRegion(); const fvMesh& thisMesh = patch().boundaryMesh().mesh(); typedef regionModels::thermalBaffleModels::thermalBaffleModel baffle; - if - ( - thisMesh.name() == polyMesh::defaultRegion - && !thisMesh.foundObject(nbrMesh) - && !owner_ - ) + if (thisMesh.name() == polyMesh::defaultRegion) { - Info << "Creating thermal baffle" << nbrMesh << endl; - baffle_.reset(baffle::New(thisMesh, dict).ptr()); - owner_ = true; - baffle_->rename(nbrMesh); + const word regionName = + dict_.lookupOrDefault("regionName", "none"); + + const word baffleName("3DBaffle" + regionName); + + if + ( + !thisMesh.time().foundObject(regionName) + && regionName != "none" + ) + { + if (extrudeMeshPtr_.empty()) + { + createPatchMesh(); + } + + baffle_.reset(baffle::New(thisMesh, dict).ptr()); + owner_ = true; + baffle_->rename(baffleName); + } + else if //Backwards compatibility (if region exists) + ( + thisMesh.time().foundObject(regionName) + && baffle_.empty() + && regionName != "none" + ) + { + baffle_.reset(baffle::New(thisMesh, dict).ptr()); + owner_ = true; + baffle_->rename(baffleName); + } } } @@ -136,8 +138,9 @@ thermalBaffleFvPatchScalarField : turbulentTemperatureRadCoupledMixedFvPatchScalarField(ptf, iF), owner_(ptf.owner_), - baffle_(ptf.baffle_), - dict_(ptf.dict_) + baffle_(), + dict_(ptf.dict_), + extrudeMeshPtr_() {} @@ -163,6 +166,36 @@ void thermalBaffleFvPatchScalarField::rmap } +void thermalBaffleFvPatchScalarField::createPatchMesh() +{ + const fvMesh& defaultRegion = + db().time().lookupObject(fvMesh::defaultRegion); + + word regionName = dict_.lookup("regionName"); + + extrudeMeshPtr_.reset + ( + new extrudePatchMesh + ( + defaultRegion, + patch(), + dict_, + regionName + ) + ); + + if (extrudeMeshPtr_.empty()) + { + WarningIn + ( + "thermalBaffleFvPatchScalarField::createPatchMesh()\n" + ) << "Specified IOobject::MUST_READ_IF_MODIFIED but class" + << " patchMeshPtr not set." + << endl; + } +} + + void thermalBaffleFvPatchScalarField::updateCoeffs() { if (this->updated()) @@ -189,27 +222,35 @@ void thermalBaffleFvPatchScalarField::write(Ostream& os) const if (thisMesh.name() == polyMesh::defaultRegion && owner_) { - word thermoModel = dict_.lookup("thermalBaffleModel"); - os.writeKeyword("thermalBaffleModel") - << thermoModel - << token::END_STATEMENT << nl; + os.writeKeyword("extrudeModel"); + os << word(dict_.lookup("extrudeModel")) + << token::END_STATEMENT << nl; + + os.writeKeyword("nLayers"); + os << readLabel(dict_.lookup("nLayers")) + << token::END_STATEMENT << nl; + + os.writeKeyword("expansionRatio"); + os << readScalar(dict_.lookup("expansionRatio")) + << token::END_STATEMENT << nl; + + os.writeKeyword("columnCells"); + os << readBool(dict_.lookup("columnCells")) + << token::END_STATEMENT << nl; + + word extrudeModel(word(dict_.lookup("extrudeModel")) + "Coeffs"); + os.writeKeyword(extrudeModel); + os << dict_.subDict(extrudeModel) << nl; word regionName = dict_.lookup("regionName"); os.writeKeyword("regionName") << regionName << token::END_STATEMENT << nl; - bool infoOutput = readBool(dict_.lookup("infoOutput")); - os.writeKeyword("infoOutput") << infoOutput - << token::END_STATEMENT << nl; - bool active = readBool(dict_.lookup("active")); os.writeKeyword("active") << active << token::END_STATEMENT << nl; - os.writeKeyword(word(thermoModel + "Coeffs")); - os << dict_.subDict(thermoModel + "Coeffs") << nl; - os.writeKeyword("thermoType"); os << dict_.subDict("thermoType") << nl; diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H index 035e0fe866..543df2e39b 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.H @@ -42,78 +42,111 @@ Description dictionary entries. \heading Patch usage - Example of the boundary condition specification: \verbatim myPatch { type compressible::temperatureThermoBaffle; - // Coupled boundary condition - Tnbr T; - kappa fluidThermo; // or solidThermo - KappaName none; - QrNbr Qr; // or none.Name of Qr field on neighbour region - Qr Qr; // or none.Name of Qr field on local region - + // Underlaying coupled boundary condition + Tnbr T; + kappa fluidThermo; // or solidThermo + KappaName none; + QrNbr Qr;//or none.Name of Qr field on neighbourregion + Qr none;// or none.Name of Qr field on localregion + value uniform 300; // Thermo baffle model - thermalBaffleModel thermalBaffle; - regionName baffleRegion; - infoOutput yes; - active yes; - thermalBaffleCoeffs - { - } + regionName baffleRegion; // solid region name + infoOutput yes; + active yes; - - // Solid thermo - thermoType - { - type heSolidThermo; - mixture pureSolidMixture; - transport constIso; - thermo hConst; - equationOfState rhoConst; - specie specie; - energy sensibleEnthalpy; - } - - mixture - { - specie + // Solid thermo in solid region + thermoType { - nMoles 1; - molWeight 20; + type heSolidThermo; + mixture pureSolidMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; } - transport - { - kappa 0.01; - } - thermodynamics - { - Hf 0; - Cp 15; - } - density - { - rho 80; - } - } - radiation - { - radiationModel opaqueSolid; - absorptionEmissionModel none; - scatterModel none; - } + mixture + { + specie + { + nMoles 1; + molWeight 20; + } + transport + { + kappa 0.01; + } + thermodynamics + { + Hf 0; + Cp 15; + } + density + { + rho 80; + } + } - value uniform 300; + radiation + { + radiationModel opaqueSolid; + absorptionEmissionModel none; + scatterModel none; + } + + + // Extrude model for new region + + extrudeModel linearNormal; + nLayers 50; + expansionRatio 1; + columnCells false; //3D or 1D + linearNormalCoeffs + { + thickness 0.02; + } + + + // New mesh polyPatch information + + bottomCoeffs + { + name "bottom"; + type mappedWall; + sampleMode nearestPatchFace; + samplePatch baffle3DWall_master; + offsetMode uniform; + offset (0 0 0); + } + + topCoeffs + { + name "top"; + type mappedWall; + sampleMode nearestPatchFace; + samplePatch baffle3DWall_slave; + offsetMode uniform; + offset (0 0 0); + } + + sideCoeffs + { + name "side"; + type patch; + } } \endverbatim SeeAlso - Foam::turbulentTemperatureRadCoupledMixedFvPatchScalarField + Foam::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField Foam::regionModels::thermalBaffleModels::thermalBaffleModel SourceFiles @@ -128,6 +161,7 @@ SourceFiles #include "autoPtr.H" #include "regionModel.H" #include "thermalBaffleModel.H" +#include "extrudePatchMesh.H" #include "turbulentTemperatureRadCoupledMixedFvPatchScalarField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -157,6 +191,14 @@ class thermalBaffleFvPatchScalarField //- Dictionary dictionary dict_; + //- Auto pointer to extrapolated mesh from patch + autoPtr extrudeMeshPtr_; + + + // Private member functions + + //- Extrude mesh + void createPatchMesh(); public: diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C index 44ae867df7..9b77f067cf 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModelNew.C @@ -53,11 +53,14 @@ autoPtr thermalBaffleModel::New(const fvMesh& mesh) ) ); - thermalBafflePropertiesDict.lookup("thermalBaffleModel") >> modelType; + word modelType = + thermalBafflePropertiesDict.lookupOrDefault + ( + "thermalBaffleModel", + "thermalBaffle" + ); } - Info<< "Selecting baffle model " << modelType << endl; - meshConstructorTable::iterator cstrIter = meshConstructorTablePtr_->find(modelType); @@ -82,9 +85,8 @@ autoPtr thermalBaffleModel::New const dictionary& dict ) { - word modelType = dict.lookup("thermalBaffleModel"); - - Info<< "Selecting baffle model " << modelType << endl; + word modelType = + dict.lookupOrDefault("thermalBaffleModel", "thermalBaffle"); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(modelType); diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C index e39162f585..adc14b03eb 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.C @@ -46,13 +46,17 @@ thermalBaffle1DFvPatchScalarField const DimensionedField& iF ) : + mappedPatchBase(p.patch()), mixedFvPatchScalarField(p, iF), TName_("T"), baffleActivated_(true), thickness_(p.size()), Qs_(p.size()), solidDict_(), - solidPtr_(NULL) + solidPtr_(NULL), + QrPrevious_(p.size()), + QrRelaxation_(0), + QrName_("undefined-Qr") {} @@ -66,13 +70,17 @@ thermalBaffle1DFvPatchScalarField const fvPatchFieldMapper& mapper ) : + mappedPatchBase(p.patch(), ptf), mixedFvPatchScalarField(ptf, p, iF, mapper), TName_(ptf.TName_), baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), solidDict_(ptf.solidDict_), - solidPtr_(ptf.solidPtr_) + solidPtr_(ptf.solidPtr_), + QrPrevious_(ptf.QrPrevious_), + QrRelaxation_(ptf.QrRelaxation_), + QrName_(ptf.QrName_) {} @@ -85,33 +93,25 @@ thermalBaffle1DFvPatchScalarField const dictionary& dict ) : + mappedPatchBase + ( + p.patch(), + p.boundaryMesh().mesh().name(), + NEARESTPATCHFACE, + dict.lookup("samplePatch"), + 0.0 + ), mixedFvPatchScalarField(p, iF), TName_("T"), - baffleActivated_(readBool(dict.lookup("baffleActivated"))), - thickness_(scalarField("thickness", dict, p.size())), - Qs_(scalarField("Qs", dict, p.size())), + baffleActivated_(dict.lookupOrDefault("baffleActivated", true)), + thickness_(), + Qs_(), solidDict_(dict), - solidPtr_(new solidType(dict)) + solidPtr_(), + QrPrevious_(p.size(), 0.0), + QrRelaxation_(dict.lookupOrDefault("relaxation", 0)), + QrName_(dict.lookupOrDefault("Qr", "none")) { - if (!isA(this->patch().patch())) - { - FatalErrorIn - ( - "thermalBaffle1DFvPatchScalarField::" - "thermalBaffle1DFvPatchScalarField" - "(" - "const fvPatch&,\n" - "const DimensionedField&, " - "const dictionary&" - ")" - ) << "\n patch type '" << patch().type() - << "' not type '" << mappedPatchBase::typeName << "'" - << "\n for patch " << patch().name() - << " of field " << dimensionedInternalField().name() - << " in file " << dimensionedInternalField().objectPath() - << exit(FatalError); - } - fvPatchScalarField::operator=(scalarField("value", dict, p.size())); if (dict.found("refValue") && baffleActivated_) @@ -139,13 +139,17 @@ thermalBaffle1DFvPatchScalarField const thermalBaffle1DFvPatchScalarField& ptf ) : + mappedPatchBase(ptf.patch().patch(), ptf), mixedFvPatchScalarField(ptf), TName_(ptf.TName_), baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), solidDict_(ptf.solidDict_), - solidPtr_(ptf.solidPtr_) + solidPtr_(ptf.solidPtr_), + QrPrevious_(ptf.QrPrevious_), + QrRelaxation_(ptf.QrRelaxation_), + QrName_(ptf.QrName_) {} @@ -157,29 +161,118 @@ thermalBaffle1DFvPatchScalarField const DimensionedField& iF ) : + mappedPatchBase(ptf.patch().patch(), ptf), mixedFvPatchScalarField(ptf, iF), TName_(ptf.TName_), baffleActivated_(ptf.baffleActivated_), thickness_(ptf.thickness_), Qs_(ptf.Qs_), solidDict_(ptf.solidDict_), - solidPtr_(ptf.solidPtr_) + solidPtr_(ptf.solidPtr_), + QrPrevious_(ptf.QrPrevious_), + QrRelaxation_(ptf.QrRelaxation_), + QrName_(ptf.QrName_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -const solidType& thermalBaffle1DFvPatchScalarField::solidPtr() const +bool thermalBaffle1DFvPatchScalarField::owner() const { - if (!solidPtr_.empty()) + const label patchi = patch().index(); + + const label nbrPatchi = samplePolyPatch().index(); + + return (patchi < nbrPatchi); +} + + +template +const solidType& thermalBaffle1DFvPatchScalarField::solid() const +{ + if (this->owner()) { + if (solidPtr_.empty()) + { + solidPtr_.reset(new solidType(solidDict_)); + } return solidPtr_(); } else { - solidPtr_.reset(new solidType(solidDict_)); - return solidPtr_(); + const fvPatch& nbrPatch = + patch().boundaryMesh()[samplePolyPatch().index()]; + + const thermalBaffle1DFvPatchScalarField& nbrField = + refCast + ( + nbrPatch.template lookupPatchField(TName_) + ); + + return nbrField.solid(); + } +} + + +template +const scalarField& thermalBaffle1DFvPatchScalarField:: +baffleThickness() const +{ + if (this->owner()) + { + if (thickness_.size() > 0) + { + return thickness_; + } + else + { + thickness_ = scalarField("thickness", solidDict_, patch().size()); + return thickness_; + } + } + else + { + const fvPatch& nbrPatch = + patch().boundaryMesh()[samplePolyPatch().index()]; + const thermalBaffle1DFvPatchScalarField& nbrField = + refCast + ( + nbrPatch.template lookupPatchField(TName_) + ); + + return nbrField.thickness_; + } +} + + +template +const scalarField& thermalBaffle1DFvPatchScalarField::Qs() const +{ + if (this->owner()) + { + if (Qs_.size() > 0) + { + return Qs_; + } + else + { + Qs_ = scalarField("Qs", solidDict_, patch().size()); + return Qs_; + } + } + else + { + const fvPatch& nbrPatch = + patch().boundaryMesh()[samplePolyPatch().index()]; + + const thermalBaffle1DFvPatchScalarField& nbrField = + refCast + ( + nbrPatch.template lookupPatchField(TName_) + ); + + return nbrField.Qs_; } } @@ -219,18 +312,14 @@ void thermalBaffle1DFvPatchScalarField::updateCoeffs() { return; } - // Since we're inside initEvaluate/evaluate there might be processor // comms underway. Change the tag we use. int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag+1; - const mappedPatchBase& mpp = - refCast(patch().patch()); - const label patchi = patch().index(); - const label nbrPatchi = mpp.samplePolyPatch().index(); + const label nbrPatchi = samplePolyPatch().index(); if (baffleActivated_) { @@ -243,108 +332,49 @@ void thermalBaffle1DFvPatchScalarField::updateCoeffs() ); // local properties - const scalarField kappaw(turbModel.kappaEff(patchi)); const fvPatchScalarField& Tp = patch().template lookupPatchField(TName_); - const scalarField qDot(kappaw*Tp.snGrad()); + + scalarField Qr(Tp.size(), 0.0); + + if (QrName_ != "none") + { + Qr = patch().template lookupPatchField + (QrName_); + + Qr = QrRelaxation_*Qr + (1.0 - QrRelaxation_)*QrPrevious_; + QrPrevious_ = Qr; + } tmp Ti = patchInternalField(); - scalarField myh(patch().deltaCoeffs()*kappaw); + scalarField myKDelta(patch().deltaCoeffs()*kappaw); - // nbr properties - - const scalarField nbrKappaw(turbModel.kappaEff(nbrPatchi)); - - const fvPatchScalarField& nbrTw = + // nrb properties + const fvPatchScalarField& nbrTp = turbModel.thermo().T().boundaryField()[nbrPatchi]; - scalarField nbrQDot(nbrKappaw*nbrTw.snGrad()); - mpp.map().distribute(nbrQDot); - - const thermalBaffle1DFvPatchScalarField& nbrField = - refCast - ( - nbrPatch.template lookupPatchField(TName_) - ); - - scalarField nbrTi(nbrField.patchInternalField()); - mpp.map().distribute(nbrTi); - - scalarField nbrTp = - nbrPatch.template lookupPatchField(TName_); - mpp.map().distribute(nbrTp); - - scalarField nbrh(nbrPatch.deltaCoeffs()*nbrKappaw); - mpp.map().distribute(nbrh); - - - // heat source - const scalarField Q(Qs_/thickness_); - - tmp tKDeltaw(new scalarField(patch().size())); - scalarField KDeltaw = tKDeltaw(); - - // Create fields for solid properties (p paramater not used) - forAll(KDeltaw, i) + // solid properties + scalarField kappas(patch().size(), 0.0); + forAll(kappas, i) { - KDeltaw[i] = - solidPtr().kappa(0.0, (Tp[i] + nbrTw[i])/2.0)/thickness_[i]; + kappas[i] = solid().kappa(0.0, (Tp[i] + nbrTp[i])/2.0); } - const scalarField q - ( - (Ti() - nbrTi)/(1.0/KDeltaw + 1.0/nbrh + 1.0/myh) - ); + scalarField KDeltaSolid(kappas/baffleThickness()); - forAll(qDot, i) - { - if (Qs_[i] == 0) - { - this->refValue()[i] = Ti()[i] - q[i]/myh[i]; - this->refGrad()[i] = 0.0; - this->valueFraction()[i] = 1.0; - } - else - { - if (q[i] > 0) - { - this->refValue()[i] = - nbrTp[i] - - Q[i]*thickness_[i]/(2*KDeltaw[i]); + scalarField alpha(KDeltaSolid - Qr/Tp); - this->refGrad()[i] = 0.0; - this->valueFraction()[i] = - 1.0 - / - ( - 1.0 - + patch().deltaCoeffs()[i]*kappaw[i]/KDeltaw[i] - ); - } - else if (q[i] < 0) - { - this->refValue()[i] = 0.0; - this->refGrad()[i] = - (-nbrQDot[i] + Q[i]*thickness_[i])/kappaw[i]; - this->valueFraction()[i] = 0.0; - } - else - { - scalar Qt = Q[i]*thickness_[i]; - this->refValue()[i] = 0.0; - this->refGrad()[i] = Qt/2/kappaw[i]; - this->valueFraction()[i] = 0.0; - } - } - } + valueFraction() = alpha/(alpha + myKDelta); + + refValue() = (KDeltaSolid*nbrTp + Qs()/2.0)/alpha; if (debug) { - scalar Q = gSum(patch().magSf()*qDot); + scalar Q = gAverage(kappaw*snGrad()); Info<< patch().boundaryMesh().mesh().name() << ':' << patch().name() << ':' << this->dimensionedInternalField().name() << " <- " @@ -366,16 +396,21 @@ void thermalBaffle1DFvPatchScalarField::updateCoeffs() } template -void thermalBaffle1DFvPatchScalarField:: write(Ostream& os) const +void thermalBaffle1DFvPatchScalarField::write(Ostream& os) const { mixedFvPatchScalarField::write(os); - os.writeKeyword("TName") - << TName_ << token::END_STATEMENT << nl; - thickness_.writeEntry("thickness", os); - os.writeKeyword("baffleActivated") - << baffleActivated_ << token::END_STATEMENT << nl; - Qs_.writeEntry("Qs", os); - solidPtr().write(os); + mappedPatchBase::write(os); + + if (this->owner()) + { + baffleThickness().writeEntry("thickness", os); + Qs().writeEntry("Qs", os); + solid().write(os); + } + + os.writeKeyword("Qr")<< QrName_ << token::END_STATEMENT << nl; + os.writeKeyword("QrRelaxation")<< QrRelaxation_ + << token::END_STATEMENT << nl; } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H index 399e80062a..d2ab8bc2d5 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/thermalBaffle1D/thermalBaffle1DFvPatchScalarField.H @@ -24,9 +24,68 @@ License Class Foam::thermalBaffle1DFvPatchScalarField +Group + grpThermoBoundaryConditions + Description - Boundary which solves the 1D steady state heat transfer equation - through a baffle. + + This BC solves a steady 1D thermal baffle. The solid properties are + specify as dictionary. Optionaly radiative heat flux (Qr) can be + incorporated into the balance. Some under-relaxation might be needed on + Qr. + Baffle and solid properties need to be specified on the master side + of the baffle. + + \heading Patch usage + Example of the boundary condition specification using constant + solid thermo : + + \verbatim + myPatch_master + { + type compressible::thermalBaffle1D; + samplePatch myPatch_slave; + + thickness uniform 0.005; // thickness [m] + Qs uniform 100; // heat flux [W/m2] + + Qr none; + relaxation 0; + + // Solid thermo + specie + { + nMoles 1; + molWeight 20; + } + transport + { + kappa 1; + } + thermodynamics + { + Hf 0; + Cp 10; + } + equationOfState + { + rho 10; + } + + value uniform 300; + } + + myPatch_slave + { + type compressible::thermalBaffle1D; + samplePatch myPatch_master_master; + + Qr none; + relaxation 0; + } + \endverbatim + + SourceFiles thermalBaffle1DFvPatchScalarField.C @@ -38,7 +97,7 @@ SourceFiles #include "mixedFvPatchFields.H" #include "autoPtr.H" - +#include "mappedPatchBase.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -54,6 +113,7 @@ namespace compressible template class thermalBaffle1DFvPatchScalarField : + public mappedPatchBase, public mixedFvPatchScalarField { // Private data @@ -65,10 +125,10 @@ class thermalBaffle1DFvPatchScalarField bool baffleActivated_; //- Baffle thickness [m] - scalarField thickness_; + mutable scalarField thickness_; //- Superficial heat source [W/m2] - scalarField Qs_; + mutable scalarField Qs_; //- Solid dictionary dictionary solidDict_; @@ -76,11 +136,29 @@ class thermalBaffle1DFvPatchScalarField //- Solid thermo mutable autoPtr solidPtr_; + //- Chache Qr for relaxation + scalarField QrPrevious_; + + //- Relaxation for Qr + scalar QrRelaxation_; + + //- Name of the radiative heat flux in local region + const word QrName_; + // Private members - //- Return non const solid thermo autoMap - const solidType& solidPtr() const; + //- Return const solid thermo + const solidType& solid() const; + + //- Return Qs from master + const scalarField& Qs() const; + + //- Return thickness from master + const scalarField& baffleThickness() const; + + //- Is Owner + bool owner() const; public: @@ -153,7 +231,6 @@ public: // Member functions - // Mapping functions //- Map (and resize as needed) from self given a mapping object @@ -170,8 +247,6 @@ public: ); - - //- Update the coefficients associated with the patch field virtual void updateCoeffs(); diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/T b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/T index 92fbe4aaac..cba8f5dedd 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/T +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/T @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 0 0 1 0 0 0 ]; +dimensions [0 0 0 1 0 0 0]; internalField uniform 300; diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U index 76239f12dd..713c1df761 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/U @@ -46,6 +46,7 @@ boundaryField { type empty; } + } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/alphat b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/alphat index 8820babcbe..d98e7838b4 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/alphat +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/alphat @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; @@ -24,11 +24,13 @@ boundaryField floor { type compressible::alphatWallFunction; + Prt 0.85; value uniform 0; } ceiling { type compressible::alphatWallFunction; + Prt 0.85; value uniform 0; } inlet diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/Q b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/Q similarity index 100% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/Q rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/Q diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/T b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/T new file mode 100644 index 0000000000..2c6bde2e11 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/T @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 0 0 1 0 0 0 ]; + +internalField uniform 300; + +boundaryField +{ + bottom + { + type compressible::thermalBaffle; + Tnbr T; + kappa solidThermo; + kappaName none; + QrNbr none; + Qr none; + value uniform 300; + } + side + { + type zeroGradient; + } + top + { + type compressible::thermalBaffle; + Tnbr T; + kappa solidThermo; + kappaName none; + QrNbr none; + Qr none; + value uniform 300; + } +} + + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/p b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/p similarity index 100% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/p rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffle3DRegion/p diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon index 69f9ac6803..7e7f3670e7 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/epsilon @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 2 -3 0 0 0 0 ]; +dimensions [0 2 -3 0 0 0 0]; internalField uniform 0.01; @@ -24,11 +24,17 @@ boundaryField floor { type compressible::epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; value uniform 0.01; } ceiling { type compressible::epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; value uniform 0.01; } inlet diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureMasterBafflePatches similarity index 65% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureMasterBafflePatches index 9a2dade638..5e2ff882e3 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/thermalBaffleProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureMasterBafflePatches @@ -5,27 +5,18 @@ | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -FoamFile + +T { - version 2.0; - format ascii; - class dictionary; - location "constant"; - object thermalBaffleProperties; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + type compressible::thermalBaffle1D; + samplePatch baffle1DWall_slave; -thermalBaffleModel none; + thickness uniform 0.005; // thickness [m] + Qs uniform 100; // heat flux [W/m2] -active no; + # include "1DbaffleSolidThermo" -regionName none; - -thermalBaffleCoeffs -{ + value uniform 300; } -noThermoCoeffs -{ -} // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureSlaveBafflePatches b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureSlaveBafflePatches new file mode 100644 index 0000000000..eafad0fe98 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DTemperatureSlaveBafflePatches @@ -0,0 +1,16 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +T +{ + type compressible::thermalBaffle1D; + samplePatch baffle1DWall_master; + value uniform 300; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/T b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DbaffleSolidThermo similarity index 69% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/T rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DbaffleSolidThermo index 014bb7621e..82a4468a90 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/baffleRegion/T +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/1DBaffle/1DbaffleSolidThermo @@ -5,23 +5,24 @@ | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -FoamFile + +specie { - version 2.0; - format ascii; - class volScalarField; - location "0"; - object T; + nMoles 1; + molWeight 20; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [ 0 0 0 1 0 0 0 ]; - -internalField uniform 300; - -boundaryField +transport { + kappa 1; +} +thermodynamics +{ + Hf 0; + Cp 10; +} +equationOfState +{ + rho 10; } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureMasterBafflePatches b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureMasterBafflePatches new file mode 100644 index 0000000000..17ab57161f --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureMasterBafflePatches @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +T +{ + type compressible::thermalBaffle; + Tnbr T; + kappa fluidThermo; + kappaName none; + QrNbr none; + Qr none; + value uniform 300; + + // Thermo baffle model + //thermalBaffleModel thermalBaffle; + regionName ${baffleRegionName}; + active yes; + + # include "3DbaffleSolidThermo" + + // New fvMesh (region) information + # include "extrudeModel" + + + // New mesh polyPatch information + bottomCoeffs + { + name "bottom"; + type mappedWall; + sampleMode nearestPatchFace; + samplePatch ${masterPatchName}; + offsetMode uniform; + offset (0 0 0); + } + + topCoeffs + { + name "top"; + type mappedWall; + sampleMode nearestPatchFace; + samplePatch ${slavePatchName}; + offsetMode uniform; + offset (0 0 0); + } + + sideCoeffs + { + name "side"; + type patch; + } +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureSlaveBafflePatches b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureSlaveBafflePatches new file mode 100644 index 0000000000..9ca00a628f --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DTemperatureSlaveBafflePatches @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +T +{ + type compressible::thermalBaffle; + Tnbr T; + kappa fluidThermo; + kappaName none; + QrNbr none; + Qr none; + value uniform 300; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DbaffleSolidThermo b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DbaffleSolidThermo new file mode 100644 index 0000000000..05d8ca3f74 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/3DbaffleSolidThermo @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + + // Solid thermo +thermoType +{ + type heSolidThermo; + mixture pureMixture; + transport constIso; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleEnthalpy; +} + +mixture +{ + specie + { + nMoles 1; + molWeight 20; + } + transport + { + kappa ${Kappa}; + } + thermodynamics + { + Hf 0; + Cp ${Cp}; + } + equationOfState + { + rho ${rho}; + } +} + +radiation +{ + radiationModel opaqueSolid; + absorptionEmissionModel none; + scatterModel none; +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/extrudeToRegionMeshDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/extrudeModel similarity index 50% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/extrudeToRegionMeshDict rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/extrudeModel index fd563a35d1..da7c54084d 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/extrudeToRegionMeshDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/3DBaffle/extrudeModel @@ -5,34 +5,14 @@ | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object extrudeToRegionMeshDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -region baffleRegion; - -faceZones (baffleFaces2); - -oneD false; - -extrudeModel linearNormal; - -nLayers 10; - -expansionRatio 1; - -adaptMesh yes; // apply directMapped to both regions - -sampleMode nearestPatchFace; +extrudeModel linearNormal; +nLayers ${nLayers}; +expansionRatio 1; +columnCells ${oneD}; //3D linearNormalCoeffs { - thickness 0.02; + thickness ${thickness}; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/baffle3DSetup b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/baffle3DSetup new file mode 100644 index 0000000000..4203ba9223 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/baffle3DSetup @@ -0,0 +1,27 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +baffleRegionName baffle3DRegion; + +masterPatchName baffle3DRegionMaster; + +slavePatchName baffle3DRegionSlave; + +oneD false; + +nLayers 50; + +thickness 0.02; + +Kappa 0.01; + +Cp 15; + +rho 80; + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches new file mode 100644 index 0000000000..fd5f3f8c4c --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/include/wallBafflePatches @@ -0,0 +1,50 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +alphat +{ + type compressible::alphatWallFunction; + value uniform 0; +} + +epsilon +{ + type compressible::epsilonWallFunction; + value uniform 0.01; +} + +k +{ + type compressible::kqRWallFunction; + value uniform 0.01; +} + +mut +{ + type mutkWallFunction; + value uniform 0; +} + +p +{ + type calculated; + value uniform 101325; +} + +p_rgh +{ + type fixedFluxPressure; +} + +U +{ + type fixedValue; + value uniform (0 0 0); +} + +// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k index 9ecfe3d9f8..6e03f3ece4 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/k @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 0 2 -2 0 0 0 0 ]; +dimensions [0 2 -2 0 0 0 0]; internalField uniform 0.1; @@ -44,6 +44,7 @@ boundaryField { type empty; } + } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut index f83a004214..cf8ccb9182 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/mut @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -1 0 0 0 0 ]; +dimensions [1 -1 -1 0 0 0 0]; internalField uniform 0; @@ -24,11 +24,17 @@ boundaryField floor { type mutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; value uniform 0; } ceiling { type mutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; value uniform 0; } inlet @@ -45,6 +51,7 @@ boundaryField { type empty; } + } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p index d20b276591..2d49a19495 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -2 0 0 0 0 ]; +dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; @@ -24,27 +24,28 @@ boundaryField floor { type calculated; - value $internalField; + value uniform 101325; } ceiling { type calculated; - value $internalField; + value uniform 101325; } inlet { type calculated; - value $internalField; + value uniform 101325; } outlet { type calculated; - value $internalField; + value uniform 101325; } fixedWalls { type empty; } + } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh index 9fa4a5a2c8..d4845488a8 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -dimensions [ 1 -1 -2 0 0 0 0 ]; +dimensions [1 -1 -2 0 0 0 0]; internalField uniform 101325; @@ -24,27 +24,31 @@ boundaryField floor { type fixedFluxPressure; - value $internalField; + gradient uniform 0; + value uniform 101325; } ceiling { type fixedFluxPressure; - value $internalField; + gradient uniform 0; + value uniform 101325; } inlet { type fixedFluxPressure; - value $internalField; + gradient uniform 0; + value uniform 101325; } outlet { type fixedValue; - value $internalField; + value uniform 101325; } fixedWalls { type empty; } + } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean index 8bb8e3f1be..1bd3d43e01 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allclean @@ -5,7 +5,8 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/CleanFunctions cleanCase -rm -rf constant/baffleRegion/polyMesh -rm -rf sets 0 +rm -rf constant/baffle3DRegion +rm -rf constant/polyMesh/boundary +rm -rf 0 # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun index e83f5f5977..e60b87bdff 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun @@ -4,25 +4,11 @@ # Get application name application=`getApplication` -cp -r 0.org 0 runApplication blockMesh -runApplication topoSet +cp -r 0.org 0 -unset FOAM_SETNAN -unset FOAM_SIGFPE - -# Create first baffle +# Create 1D and 3D baffles runApplication createBaffles -overwrite -# Create region -runApplication extrudeToRegionMesh -overwrite - -# Set Bc's for the region baffle -runApplication changeDictionary -dict system/changeDictionaryDict.baffleRegion -literalRE -rm log.changeDictionary - -# Reset proper values at the region -runApplication changeDictionary -region baffleRegion -literalRE - runApplication $application diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/blockMeshDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/blockMeshDict index 4b273990da..e7907cf3e2 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/blockMeshDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/polyMesh/blockMeshDict @@ -22,10 +22,10 @@ vertices (10 0 0) (10 5 0) (0 5 0) - (0 0 10) - (10 0 10) - (10 5 10) - (0 5 10) + (0 0 1) + (10 0 1) + (10 5 1) + (0 5 1) ); blocks diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle1D.stl b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle1D.stl new file mode 100644 index 0000000000..f15814e7d9 --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle1D.stl @@ -0,0 +1,16 @@ +solid ascii + facet normal -1 0 0 + outer loop + vertex 0.3 0 0 + vertex 0.3 0 0.1 + vertex 0.3 0.2 0 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.3 0.2 0.1 + vertex 0.3 0.2 0 + vertex 0.3 0 0.1 + endloop + endfacet +endsolid diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle3D.stl b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle3D.stl new file mode 100644 index 0000000000..cd472ca99f --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/constant/triSurface/baffle3D.stl @@ -0,0 +1,58 @@ +solid ascii + facet normal -1 0 0 + outer loop + vertex 0.59 0 0 + vertex 0.59 0 0.05 + vertex 0.59 0.1 0 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.1 0.05 + vertex 0.59 0.1 0 + vertex 0.59 0 0.05 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0 0.05 + vertex 0.59 0 0.1 + vertex 0.59 0.1 0.05 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.1 0.1 + vertex 0.59 0.1 0.05 + vertex 0.59 0 0.1 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.1 0 + vertex 0.59 0.1 0.05 + vertex 0.59 0.2 0 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.2 0.05 + vertex 0.59 0.2 0 + vertex 0.59 0.1 0.05 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.1 0.05 + vertex 0.59 0.1 0.1 + vertex 0.59 0.2 0.05 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0.59 0.2 0.1 + vertex 0.59 0.2 0.05 + vertex 0.59 0.1 0.1 + endloop + endfacet +endsolid diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffle3DRegion/fvSchemes similarity index 100% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/fvSchemes rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffle3DRegion/fvSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffle3DRegion/fvSolution similarity index 100% rename from tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/fvSolution rename to tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffle3DRegion/fvSolution diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict deleted file mode 100644 index 5582d92c36..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/baffleRegion/changeDictionaryDict +++ /dev/null @@ -1,58 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object changeDictionaryDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dictionaryReplacement -{ - T - { - boundaryField - { - "region0_to.*" - { - type compressible::thermalBaffle; - Tnbr T; - kappa solidThermo; - kappaName none; - QrNbr none; - Qr none; - value uniform 300; - } - baffleFaces2_side - { - type zeroGradient; - } - floor - { - type fixedValue; - value uniform 300; - } - fixedWalls - { - type empty; - } - } - } - - boundary - { - floor - { - type patch; - } - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict deleted file mode 100644 index cac8df324c..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict +++ /dev/null @@ -1,125 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object changeDictionaryDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dictionaryReplacement -{ - alphat - { - boundaryField - { - "baffle.*" - { - type compressible::alphatWallFunction; - value uniform 0; - } - } - } - epsilon - { - boundaryField - { - "baffle.*" - { - type compressible::epsilonWallFunction; - value uniform 0.01; - } - } - } - k - { - boundaryField - { - "baffle.*" - { - type compressible::kqRWallFunction; - value uniform 0.01; - } - } - } - mut - { - boundaryField - { - "baffle.*" - { - type mutkWallFunction; - value uniform 0.0; - } - } - } - p - { - boundaryField - { - "baffle.*" - { - type calculated; - value uniform 101325; - } - } - } - p_rgh - { - boundaryField - { - "baffle.*" - { - type fixedFluxPressure; - value uniform 0; - } - } - } - T - { - boundaryField - { - "baffle.*" - { - type compressible::thermalBaffle1D; - baffleActivated yes; - thickness uniform 0.005; // thickness [m] - Qs uniform 100; // heat flux [W/m2] - transport - { - kappa 1.0; - } - thermodynamics - { - Hf 0; - Cp 0; - } - equationOfState - { - rho 0; - } - value uniform 300; - } - } - } - U - { - boundaryField - { - "baffle.*" - { - type fixedValue; - value uniform (0 0 0); - } - } - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle deleted file mode 100644 index ff9cc5fbdf..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffle +++ /dev/null @@ -1,130 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object changeDictionaryDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dictionaryReplacement -{ - alphat - { - boundaryField - { - "baffle1.*" - { - type compressible::alphatWallFunction; - value uniform 0; - } - } - } - epsilon - { - boundaryField - { - "baffle1.*" - { - type compressible::epsilonWallFunction; - value uniform 0.01; - } - } - } - k - { - boundaryField - { - "baffle1.*" - { - type compressible::kqRWallFunction; - value uniform 0.01; - } - } - } - mut - { - boundaryField - { - "baffle1.*" - { - type mutkWallFunction; - value uniform 0.0; - } - } - } - p - { - boundaryField - { - "baffle1.*" - { - type calculated; - value $internalField; - } - } - } - p_rgh - { - boundaryField - { - "baffle1.*" - { - type fixedFluxPressure; - value $internalField; - } - } - } - T - { - boundaryField - { - "baffle1Wall.*" - { - type compressible::thermalBaffle1D; - baffleActivated yes; - thickness uniform 0.005; // thickness [m] - Qs uniform 100; // heat flux [W/m2] - specie - { - nMoles 1; - molWeight 20; - } - transport - { - kappa 1; - } - thermodynamics - { - Hf 0; - Cp 10; - } - equationOfState - { - rho 10; - } - value uniform 300; - } - } - } - U - { - boundaryField - { - "baffle1.*" - { - type fixedValue; - value uniform (0 0 0); - } - } - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion deleted file mode 100644 index a16a520686..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/changeDictionaryDict.baffleRegion +++ /dev/null @@ -1,171 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object changeDictionaryDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dictionaryReplacement -{ - alphat - { - boundaryField - { - "region0_to_.*" - { - type compressible::alphatWallFunction; - value uniform 0; - } - } - } - epsilon - { - boundaryField - { - "region0_to_.*" - { - type compressible::epsilonWallFunction; - value uniform 0.01; - } - } - } - k - { - boundaryField - { - "region0_to_.*" - { - type compressible::kqRWallFunction; - value uniform 0.01; - } - - } - } - mut - { - boundaryField - { - "region0_to_.*" - { - type mutkWallFunction; - value uniform 0.0; - } - } - } - p - { - boundaryField - { - "region0_to_.*" - { - type calculated; - value $internalField; - } - } - } - p_rgh - { - boundaryField - { - "region0_to_.*" - { - type fixedFluxPressure; - value $internalField; - } - - } - } - T - { - boundaryField - { - - "region0_to.*" - { - type compressible::thermalBaffle; - - // Coupled BC. - Tnbr T; - kappa fluidThermo; - kappaName none; - QrNbr none; - Qr none; - - // Thermo baffle model - thermalBaffleModel thermalBaffle; - regionName baffleRegion; - infoOutput no; - active yes; - thermalBaffleCoeffs - { - } - - // Solid thermo - thermoType - { - type heSolidThermo; - mixture pureMixture; - transport constIso; - thermo hConst; - equationOfState rhoConst; - specie specie; - energy sensibleEnthalpy; - } - - mixture - { - specie - { - nMoles 1; - molWeight 20; - } - transport - { - kappa 0.01; - } - thermodynamics - { - Hf 0; - Cp 15; - } - equationOfState - { - rho 80; - } - } - - radiation - { - radiationModel opaqueSolid; - absorptionEmissionModel none; - scatterModel none; - } - - value uniform 300; - } - } - } - U - { - boundaryField - { - "region0_to_.*" - { - type fixedValue; - value uniform (0 0 0); - } - - } - } -} - -// ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict index 347a7444d4..feb96c24ba 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/createBafflesDict @@ -19,109 +19,100 @@ FoamFile // faces. internalFacesOnly true; - // Baffles to create. baffles { baffleFacesThermoBaffle1D { //- Use predefined faceZone to select faces and orientation. - type faceZone; - zoneName baffleFaces; - + type searchableSurface; + surface triSurfaceMesh; + name baffle1D.stl; patches { master { //- Master side patch - name baffle1Wall_0; - - type mappedWall; - sampleMode nearestPatchFace; - samplePatch baffle1Wall_1; - offset (0 0 0); + name baffle1DWall_master; + type wall; + inGroups (baffleWallGroup); patchFields { - T - { - type compressible::thermalBaffle1D; - baffleActivated yes; - thickness uniform 0.005; // thickness [m] - Qs uniform 100; // heat flux [W/m2] - specie - { - nMoles 1; - molWeight 20; - } - transport - { - kappa 1; - } - thermodynamics - { - Hf 0; - Cp 10; - } - equationOfState - { - rho 10; - } - - value uniform 300; - } - - alphat - { - type compressible::alphatWallFunction; - value uniform 0; - } - epsilon - { - type compressible::epsilonWallFunction; - value uniform 0.01; - } - k - { - type compressible::kqRWallFunction; - value uniform 0.01; - } - mut - { - type mutkWallFunction; - value uniform 0; - } - p - { - type calculated; - value uniform 101325; - } - p_rgh - { - type fixedFluxPressure; - } - U - { - type fixedValue; - value uniform (0 0 0); - } + #include "./0/include/wallBafflePatches" + #include "./0/include/1DBaffle/1DTemperatureMasterBafflePatches" } } slave { //- Slave side patch - name baffle1Wall_1; + name baffle1DWall_slave; + + type wall; + inGroups (baffleWallGroup); + + patchFields + { + #include "./0/include/wallBafflePatches" + #include "./0/include/1DBaffle/1DTemperatureSlaveBafflePatches" + } + } + } + } + + #include "./0/include/baffle3DSetup" + + baffleFacesThermoBaffle3D + { + type searchableSurface; + surface triSurfaceMesh; + name baffle3D.stl; + + patches + { + master + { + //- Master side patch + name ${masterPatchName}; type mappedWall; + + + type interRegionMappedWallGenerator; + inGroups (baffleWallGroup); + sampleMode nearestPatchFace; - samplePatch baffle1Wall_0; + sampleRegion ${baffleRegionName}; + samplePatch bottom; + offsetMode uniform; offset (0 0 0); patchFields { - ${...master.patchFields} + #include "./0/include/wallBafflePatches" + #include "./0/include/3DBaffle/3DTemperatureMasterBafflePatches" + } + } + slave + { + //- Slave side patch + name ${slavePatchName}; + + type mappedWall; + inGroups (baffleWallGroup); + + sampleMode nearestPatchFace; + sampleRegion ${baffleRegionName}; + samplePatch top; + offsetMode uniform; + offset (0 0 0); + + patchFields + { + #include "./0/include/wallBafflePatches" + #include "./0/include/3DBaffle/3DTemperatureSlaveBafflePatches" } } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes index 2346e19d47..0145c8e18b 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSchemes @@ -27,7 +27,6 @@ gradSchemes divSchemes { default none; - div(phi,U) bounded Gauss limitedLinear 0.2; div(phi,K) bounded Gauss limitedLinear 0.2; div(phi,h) bounded Gauss limitedLinear 0.2; @@ -39,7 +38,13 @@ divSchemes laplacianSchemes { - default Gauss linear uncorrected; + default none; + laplacian(muEff,U) Gauss linear uncorrected; + laplacian(rhorAUf,p_rgh) Gauss linear uncorrected; + laplacian(alphaEff,h) Gauss linear uncorrected; + laplacian(DkEff,k) Gauss linear uncorrected; + laplacian(DepsilonEff,epsilon) Gauss linear uncorrected; + laplacian(DomegaEff,omega) Gauss linear uncorrected; } interpolationSchemes diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSolution b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSolution index ad42f98fc1..a5f011bb00 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSolution +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/fvSolution @@ -49,9 +49,9 @@ SIMPLE residualControl { - p_rgh 5e-3; - U 3e-4; - h 3e-4; + p_rgh 1e-3; + U 1e-4; + h 1e-4; // possibly check turbulence fields "(k|epsilon|omega)" 5e-3; @@ -62,8 +62,8 @@ relaxationFactors { rho 1.0; p_rgh 0.7; - U 0.7; - h 0.3; + U 0.3; + h 0.7; "(k|epsilon|omega)" 0.3; } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/topoSetDict b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/topoSetDict deleted file mode 100644 index 36f5b003b9..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/system/topoSetDict +++ /dev/null @@ -1,89 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object topoSetDict; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -actions -( - { - name baffleFaces; - type faceSet; - action new; - source boxToFace; - sourceInfo - { - box (0.296 0 0) (0.306 0.18 2); - } - } - - { - name baffleFacesSlaveCells; - type cellSet; - action new; - source boxToCell; - sourceInfo - { - box (0 0 0) (0.295 0.2 2); - } - } - - { - name baffleFaces; - type faceZoneSet; - action new; - source setsToFaceZone; - sourceInfo - { - faceSet baffleFaces; - cellSet baffleFacesSlaveCells; - } - } - - { - name baffleFaces2; - type faceSet; - action new; - source boxToFace; - sourceInfo - { - box (0.5944 0 0) (0.605 0.18 2); - } - } - - { - name baffleFacesSlaveCells2; - type cellSet; - action new; - source boxToCell; - sourceInfo - { - box (0 0 0) (0.594 0.2 2); - } - } - - { - name baffleFaces2; - type faceZoneSet; - action new; - source setsToFaceZone; - sourceInfo - { - faceSet baffleFaces2; - cellSet baffleFacesSlaveCells2; - } - } -); - -// ************************************************************************* //