diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files index e924e9de680bcbe388c230a109aa2d01c14b9adf..3ee71c0ea6ad8cd2afeb422b1b7efd4bfbfe7991 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files @@ -5,7 +5,7 @@ coupleManager/coupleManager.C derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C - +derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C chtMultiRegionFoam.C diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C index 710a9975da0abc7bc96e76e7bb5b277400b158f0..58c7bdaa399611f75148ca026cabc725d97718f6 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.C @@ -26,6 +26,7 @@ License #include "coupleManager.H" #include "OFstream.H" +#include "regionProperties.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -74,6 +75,51 @@ Foam::coupleManager::~coupleManager() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +bool Foam::coupleManager::regionOwner() const +{ + const fvMesh& nbrRegion = neighbourRegion(); + + const regionProperties& props = + localRegion_.objectRegistry::parent().lookupObject<regionProperties> + ( + "regionProperties" + ); + + label myIndex = findIndex(props.fluidRegionNames(), localRegion_.name()); + if (myIndex == -1) + { + label i = findIndex(props.solidRegionNames(), localRegion_.name()); + + if (i == -1) + { + FatalErrorIn("coupleManager::regionOwner() const") + << "Cannot find region " << localRegion_.name() + << " neither in fluids " << props.fluidRegionNames() + << " nor in solids " << props.solidRegionNames() + << exit(FatalError); + } + myIndex = props.fluidRegionNames().size() + i; + } + label nbrIndex = findIndex(props.fluidRegionNames(), nbrRegion.name()); + if (nbrIndex == -1) + { + label i = findIndex(props.solidRegionNames(), nbrRegion.name()); + + if (i == -1) + { + FatalErrorIn("coupleManager::regionOwner() const") + << "Cannot find region " << nbrRegion.name() + << " neither in fluids " << props.fluidRegionNames() + << " nor in solids " << props.solidRegionNames() + << exit(FatalError); + } + nbrIndex = props.fluidRegionNames().size() + i; + } + + return myIndex < nbrIndex; +} + + void Foam::coupleManager::checkCouple() const { Info<< "neighbourRegionName_ = " << neighbourRegionName_ << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H index aa56dedda37f1d42f7539ecde8409934c8088d37..177d9006bce34478e9b4e4d4abb14360b256a713 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/coupleManager/coupleManager.H @@ -74,9 +74,6 @@ class coupleManager // Private Member Functions - //- Disallow default bitwise copy construct -// coupleManager(const coupleManager&); - //- Disallow default bitwise assignment void operator=(const coupleManager&); @@ -129,6 +126,9 @@ public: template<class Type> inline const fvPatchField<Type>& neighbourPatchField() const; + //- Am I owner (= first to evaluate) of this region interface? + bool regionOwner() const; + //- Check that the couple is valid void checkCouple() const; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C index 3fa298b511c5a107b7a04a68f83f7b43a3843dfc..11cf785efa63388c926b2f283ec4673cd2614930 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperatureCoupled/solidWallHeatFluxTemperatureCoupledFvPatchScalarField.C @@ -115,7 +115,7 @@ void Foam::solidWallHeatFluxTemperatureCoupledFvPatchScalarField::updateCoeffs() const fvPatchField<scalar>& K = patch().lookupPatchField<volScalarField, scalar>(KName_); - gradient() = refCast<const solidWallTemperatureCoupledFvPatchScalarField> + gradient() = -refCast<const solidWallTemperatureCoupledFvPatchScalarField> (neighbourField).flux()/K; fixedGradientFvPatchScalarField::updateCoeffs(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C new file mode 100644 index 0000000000000000000000000000000000000000..ba2ee599d0cbf84d4bce1b5846ee0053fd060472 --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C @@ -0,0 +1,252 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\/ 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 2 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 "solidWallMixedTemperatureCoupledFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "regionProperties.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::solidWallMixedTemperatureCoupledFvPatchScalarField:: +solidWallMixedTemperatureCoupledFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF +) +: + mixedFvPatchScalarField(p, iF), + coupleManager_(p), + KName_("undefined-K") +{ + this->refValue() = 0.0; + this->refGrad() = 0.0; + this->valueFraction() = 1.0; + this->fixesValue_ = true; +} + + +Foam::solidWallMixedTemperatureCoupledFvPatchScalarField:: +solidWallMixedTemperatureCoupledFvPatchScalarField +( + const solidWallMixedTemperatureCoupledFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const fvPatchFieldMapper& mapper +) +: + mixedFvPatchScalarField(ptf, p, iF, mapper), + coupleManager_(ptf.coupleManager_), + KName_(ptf.KName_), + fixesValue_(ptf.fixesValue_) +{} + + +Foam::solidWallMixedTemperatureCoupledFvPatchScalarField:: +solidWallMixedTemperatureCoupledFvPatchScalarField +( + const fvPatch& p, + const DimensionedField<scalar, volMesh>& iF, + const dictionary& dict +) +: + mixedFvPatchScalarField(p, iF), + coupleManager_(p, dict), + KName_(dict.lookup("K")) +{ + fvPatchScalarField::operator=(scalarField("value", dict, p.size())); + refValue() = static_cast<scalarField>(*this); + refGrad() = 0.0; + valueFraction() = 1.0; + fixesValue_ = true; +} + + +Foam::solidWallMixedTemperatureCoupledFvPatchScalarField:: +solidWallMixedTemperatureCoupledFvPatchScalarField +( + const solidWallMixedTemperatureCoupledFvPatchScalarField& wtcsf, + const DimensionedField<scalar, volMesh>& iF +) +: + mixedFvPatchScalarField(wtcsf, iF), + coupleManager_(wtcsf.coupleManager_), + KName_(wtcsf.KName_), + fixesValue_(wtcsf.fixesValue_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +const Foam::fvPatchScalarField& +Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::K() const +{ + return this->patch().lookupPatchField<volScalarField, scalar>(KName_); +} + + +void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + tmp<scalarField> intFld = patchInternalField(); + + label nFixed = 0; + + // Like snGrad but bypass switching on refValue/refGrad. + tmp<scalarField> normalGradient = + (*this-intFld()) + * patch().deltaCoeffs(); + + if (debug) + { + Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::" + << "updateCoeffs() :" + << " walltemperature " + << " min:" << gMin(*this) + << " max:" << gMax(*this) + << " avg:" << gAverage(*this) + << endl; + } + + forAll(*this, i) + { + // if outgoing flux use fixed value. + if (intFld()[i] > operator[](i)) + { + this->refValue()[i] = operator[](i); + this->refGrad()[i] = 0.0; // not used + this->valueFraction()[i] = 1.0; + nFixed++; + } + else + { + this->refValue()[i] = 0.0; // not used + this->refGrad()[i] = normalGradient()[i]; + this->valueFraction()[i] = 0.0; + } + } + + reduce(nFixed, sumOp<label>()); + + fixesValue_ = (nFixed > 0); + + if (debug) + { + label nTotSize = returnReduce(this->size(), sumOp<label>()); + + Info<< "solidWallMixedTemperatureCoupledFvPatchScalarField::" + << "updateCoeffs() : Out of " << nTotSize + << " fixedBC:" << nFixed + << " gradient:" << nTotSize-nFixed << endl; + } + + mixedFvPatchScalarField::updateCoeffs(); +} + + +void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::evaluate +( + const Pstream::commsTypes +) +{ + if (!this->updated()) + { + this->updateCoeffs(); + } + + if (!coupleManager_.regionOwner()) + { + // I am the last one to evaluate. + + tmp<scalarField> intFld = patchInternalField(); + + const fvPatch& nbrPatch = coupleManager_.neighbourPatch(); + + solidWallMixedTemperatureCoupledFvPatchScalarField& nbrField = + refCast<solidWallMixedTemperatureCoupledFvPatchScalarField> + ( + const_cast<fvPatchField<scalar>&> + ( + coupleManager_.neighbourPatchField<scalar>() + ) + ); + tmp<scalarField> nbrIntFld = nbrField.patchInternalField(); + tmp<scalarField> myKDelta = K()*patch().deltaCoeffs(); + tmp<scalarField> nbrKDelta = nbrField.K()*nbrPatch.deltaCoeffs(); + + // Calculate common wall temperature and assign to both sides + scalarField::operator= + ( + (myKDelta()*intFld + nbrKDelta()*nbrIntFld) + / (myKDelta() + nbrKDelta()) + ); + + nbrField.scalarField::operator=(*this); + + if (debug) + { + Info<< "Setting master and slave to wall temperature " + << " min:" << gMin(*this) + << " max:" << gMax(*this) + << " avg:" << gAverage(*this) + << endl; + } + } + + fvPatchScalarField::evaluate(); +} + + +void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::write +( + Ostream& os +) const +{ + mixedFvPatchScalarField::write(os); + coupleManager_.writeEntries(os); + os.writeKeyword("K") << KName_ << token::END_STATEMENT << nl; +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +makePatchTypeField +( + fvPatchScalarField, + solidWallMixedTemperatureCoupledFvPatchScalarField +); + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H new file mode 100644 index 0000000000000000000000000000000000000000..b650ee226ea30cb23cd3988ba1af4ff867481799 --- /dev/null +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.H @@ -0,0 +1,184 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\/ 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 2 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 + solidWallMixedTemperatureCoupledFvPatchScalarField + +Description + Mixed boundary condition for temperature, to be used by the + conjugate heat transfer solver. + If my temperature is T1, neighbour is T2: + + T1 > T2: my side becomes fixedValue T2 bc, other side becomes fixedGradient. + + + Example usage: + myInterfacePatchName + { + type solidWallMixedTemperatureCoupled; + neighbourRegionName fluid; + neighbourPatchName fluidSolidInterface; + neighbourFieldName T; + K K; + value uniform 300; + } + +SourceFiles + solidWallMixedTemperatureCoupledFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef solidWallMixedTemperatureCoupledFvPatchScalarField_H +#define solidWallMixedTemperatureCoupledFvPatchScalarField_H + +#include "fvPatchFields.H" +#include "mixedFvPatchFields.H" +#include "coupleManager.H" +#include "fvPatch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class solidWallMixedTemperatureCoupledFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class solidWallMixedTemperatureCoupledFvPatchScalarField +: + public mixedFvPatchScalarField +{ + // Private data + + //- Couple manager object + coupleManager coupleManager_; + + //- Name of thermal conductivity field + word KName_; + + bool fixesValue_; + +public: + + //- Runtime type information + TypeName("solidWallMixedTemperatureCoupled"); + + + // Constructors + + //- Construct from patch and internal field + solidWallMixedTemperatureCoupledFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct from patch, internal field and dictionary + solidWallMixedTemperatureCoupledFvPatchScalarField + ( + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const dictionary& + ); + + //- Construct by mapping given solidWallMixedTemperatureCoupledFvPatchScalarField + // onto a new patch + solidWallMixedTemperatureCoupledFvPatchScalarField + ( + const solidWallMixedTemperatureCoupledFvPatchScalarField&, + const fvPatch&, + const DimensionedField<scalar, volMesh>&, + const fvPatchFieldMapper& + ); + + //- Construct and return a clone + virtual tmp<fvPatchScalarField> clone() const + { + return tmp<fvPatchScalarField> + ( + new solidWallMixedTemperatureCoupledFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + solidWallMixedTemperatureCoupledFvPatchScalarField + ( + const solidWallMixedTemperatureCoupledFvPatchScalarField&, + const DimensionedField<scalar, volMesh>& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp<fvPatchScalarField> clone + ( + const DimensionedField<scalar, volMesh>& iF + ) const + { + return tmp<fvPatchScalarField> + ( + new solidWallMixedTemperatureCoupledFvPatchScalarField + ( + *this, + iF + ) + ); + } + + + // Member functions + + //- Get corresponding K field + const fvPatchScalarField& K() const; + + //- Return true if this patch field fixes a value. + // Needed to check if a level has to be specified while solving + // Poissons equations. + virtual bool fixesValue() const + { + return fixesValue_; + } + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Evaluate the patch field + virtual void evaluate + ( + const Pstream::commsTypes commsType=Pstream::blocking + ); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C index 3d46839dfdbb24d597f1b3b49db8a7b39b5421dc..bec8505bca2ae90e1d8cf3f625ddacad117c51d4 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.C @@ -136,7 +136,7 @@ Foam::solidWallTemperatureCoupledFvPatchScalarField::flux() const const fvPatchScalarField& Tw = *this; - return Tw.snGrad()*patch().magSf()*Kw; + return Tw.snGrad()*Kw; } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H index 231f9e4d675617ebc7789870ae26d84f5889de41..a2d5704a1c832637a3f898b8e3a8da7208be57e2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallTemperatureCoupled/solidWallTemperatureCoupledFvPatchScalarField.H @@ -138,7 +138,7 @@ public: // Member functions - //- Flux + //- (intensive) flux tmp<scalarField> flux() const; //- Update the coefficients associated with the patch field diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 907a4b835269790082f0e2b92ef62edb253c995f..314b9d028a3fb16198e0f7842a19c98c2e859e2e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -82,7 +82,7 @@ IOobject::NO_READ, IOobject::NO_WRITE ), - thermof[i].rho()*thermof[i].Cp()*thermof[i].alpha() + thermof[i].Cp()*thermof[i].alpha() ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index fd018d70962f8a8805c967abeda45cbbc92528e7..2b1f5fceb15b1cf8854cdedd9794142284360e61 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -56,5 +56,5 @@ } // Update thermal conductivity - Kf[i] = rhof[i]*thermof[i].Cp()*turb[i].alphaEff(); + Kf[i] = thermof[i].Cp()*turb[i].alphaEff(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H index 40299e7b575315ebf474e119eefff142aec054a0..790d4ec9348d2b855f23a2dcb5ea33cf2094b620 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solveSolid.H @@ -6,4 +6,7 @@ fvm::ddt(rhosCps[i], Ts[i]) - fvm::laplacian(Ks[i], Ts[i]) ); } + + Info<< "Min/max T:" << min(Ts[i]) << ' ' << max(Ts[i]) + << endl; } diff --git a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C index 4e960a7415b1305da80b693a0eb57d8dacdadc60..c2998ec8cf6ee7d9344e44fee778ac6bf20673fa 100644 --- a/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C +++ b/applications/utilities/postProcessing/sampling/probeLocations/probeLocations.C @@ -44,7 +44,14 @@ int main(int argc, char *argv[]) instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" - IOprobes sniff(mesh, "probesDict", IOobject::MUST_READ, true); + IOprobes sniff + ( + probes::typeName, + mesh, + "probesDict", + IOobject::MUST_READ, + true + ); forAll(timeDirs, timeI) { diff --git a/applications/utilities/postProcessing/sampling/sample/sample.C b/applications/utilities/postProcessing/sampling/sample/sample.C index f2b27de8ead3eb94729c5c54366f64253b134537..306c8d7aed227ab1235ef6f53d046a6eee1d0ae6 100644 --- a/applications/utilities/postProcessing/sampling/sample/sample.C +++ b/applications/utilities/postProcessing/sampling/sample/sample.C @@ -101,8 +101,23 @@ int main(int argc, char *argv[]) instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" - IOsampledSets sSets(mesh, "sampleDict", IOobject::MUST_READ, true); - IOsampledSurfaces sSurfs(mesh, "sampleDict", IOobject::MUST_READ, true); + IOsampledSets sSets + ( + sampledSets::typeName, + mesh, + "sampleDict", + IOobject::MUST_READ, + true + ); + + IOsampledSurfaces sSurfs + ( + sampledSurfaces::typeName, + mesh, + "sampleDict", + IOobject::MUST_READ, + true + ); forAll(timeDirs, timeI) { diff --git a/src/OSspecific/Unix/printStack.C b/src/OSspecific/Unix/printStack.C index 0da7842416db3ff600d6054a23db87afb121999c..33a7fb5394a0e627eabdd13342a19ed9b9556b1b 100644 --- a/src/OSspecific/Unix/printStack.C +++ b/src/OSspecific/Unix/printStack.C @@ -149,7 +149,7 @@ void getSymbolForRaw const word& address ) { - if (filename[0] == '/') + if (filename.size() > 0 && filename[0] == '/') { string fcnt = pOpen ( @@ -220,6 +220,7 @@ void error::printStack(Ostream& os) if (lPos != string::npos && rPos != string::npos && lPos<rPos) { address = msg.substr(lPos+1, rPos-lPos-1); + msg = msg.substr(0, lPos); } string::size_type bracketPos = msg.find('('); diff --git a/src/OpenFOAM/db/IOobject/IOobjectI.H b/src/OpenFOAM/db/IOobject/IOobjectI.H index 20425b8a7db0bf67d646aba77b687f468d49cab5..c87575b5b9965b1cf516416c5261c3ff49203921 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectI.H +++ b/src/OpenFOAM/db/IOobject/IOobjectI.H @@ -65,8 +65,8 @@ inline void Foam::IOobject::writeBanner(Stream& os, bool noHint) "| ========= | |\n" "| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |\n" "| \\\\ / O peration | Version: " << FOAMversion << spaces << "|\n" - "| \\\\ / A nd | |\n" - "| \\\\/ M anipulation | www.OpenFOAM.org |\n" + "| \\\\ / A nd | Web: www.OpenFOAM.org |\n" + "| \\\\/ M anipulation | |\n" "\\*---------------------------------------------------------------------------*/\n"; } diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index 4299d05b5e7abcb7f09fc136317a425cb94f204d..11edcf1adda87c3e4979ae9b7c0251c11bcf124e 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -67,7 +67,12 @@ void Foam::Time::readDict() case wcAdjustableRunTime: // Recalculate outputTimeIndex_ to be in units of current // writeInterval. - outputTimeIndex_ *= oldWriteInterval/writeInterval_; + outputTimeIndex_ = label + ( + outputTimeIndex_ + * oldWriteInterval + / writeInterval_ + ); break; default: diff --git a/src/OpenFOAM/global/global.Cver b/src/OpenFOAM/global/global.Cver index e2f411603eef4a7fc527b7f53d56731ac0b959e3..5f409deeba4be720d30c0713fd5e3b52d90c52fc 100644 --- a/src/OpenFOAM/global/global.Cver +++ b/src/OpenFOAM/global/global.Cver @@ -37,6 +37,11 @@ Description const char* const Foam::FOAMversion = "WM_PROJECT_VERSION"; +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Static initializers for string::null, word::null and fileName::null + +#include "stringsGlobals.C" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Setup an error handler for the global new operator diff --git a/src/OpenFOAM/primitives/strings/fileName/fileName.C b/src/OpenFOAM/primitives/strings/fileName/fileName.C index 5eeadf96335f968368424c71b657d6f6f4e5d724..ac63f914267d361e951b507c6e6d4cc98de90cc4 100644 --- a/src/OpenFOAM/primitives/strings/fileName/fileName.C +++ b/src/OpenFOAM/primitives/strings/fileName/fileName.C @@ -33,7 +33,6 @@ License const char* const Foam::fileName::typeName = "fileName"; int Foam::fileName::debug(debug::debugSwitch(fileName::typeName, 0)); -const Foam::fileName Foam::fileName::null; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/strings/string/string.C b/src/OpenFOAM/primitives/strings/string/string.C index 38393bfca7302740cded5dc6dca205d8ef88ca84..268a4fb2dcc5c9e2f57426c14ba1afa7117790ad 100644 --- a/src/OpenFOAM/primitives/strings/string/string.C +++ b/src/OpenFOAM/primitives/strings/string/string.C @@ -32,7 +32,6 @@ License const char* const Foam::string::typeName = "string"; int Foam::string::debug(debug::debugSwitch(string::typeName, 0)); -const Foam::string Foam::string::null; // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/strings/stringsGlobals.C b/src/OpenFOAM/primitives/strings/stringsGlobals.C new file mode 100644 index 0000000000000000000000000000000000000000..c81a032ee9b0c1a4f01bc3611ed9f2c55a516cc6 --- /dev/null +++ b/src/OpenFOAM/primitives/strings/stringsGlobals.C @@ -0,0 +1,45 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd. + \\/ 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 2 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 + +Description + Static initializers for + Foam::string::null + Foam::word::null + Foam::fileName::null. + This file is included in global.Cver since these members are required by + debug.C. + +\*---------------------------------------------------------------------------*/ + +#include "string.H" +#include "word.H" +#include "fileName.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +const Foam::string Foam::string::null; +const Foam::word Foam::word::null; +const Foam::fileName Foam::fileName::null; + +// ************************************************************************* // diff --git a/src/OpenFOAM/primitives/strings/word/word.C b/src/OpenFOAM/primitives/strings/word/word.C index 6cb36b1af295834a83e70273636502ebaa65ee24..84415533016879598a5ada76ffa6f6b3eca24b59 100644 --- a/src/OpenFOAM/primitives/strings/word/word.C +++ b/src/OpenFOAM/primitives/strings/word/word.C @@ -31,6 +31,5 @@ License const char* const Foam::word::typeName = "word"; int Foam::word::debug(Foam::debug::debugSwitch(word::typeName, 0)); -const Foam::word Foam::word::null; // ************************************************************************* // diff --git a/src/OpenFOAM/primitives/uint/uintIO.C b/src/OpenFOAM/primitives/uint/uintIO.C index 26b64224f76f5c9aa6a75b215207d20a17efef74..a40d4b7f5f931bb5cac79f070dc539be89417a03 100644 --- a/src/OpenFOAM/primitives/uint/uintIO.C +++ b/src/OpenFOAM/primitives/uint/uintIO.C @@ -44,7 +44,6 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Return a string representation of an uint word name(const unsigned int i) { std::ostringstream osBuffer; @@ -66,7 +65,7 @@ Istream& operator>>(Istream& is, unsigned int& i) if (t.isLabel()) { - i = uint(t.labelToken()); + i = unsigned(t.labelToken()); } else { diff --git a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C index 27740816ac815c42e78fa974062f28f1c5d49b85..9b43979ae39f92ac69c9072ea0d11ec5eeed7ade 100644 --- a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C @@ -59,7 +59,7 @@ const NamedEnum<shellSurfaces::refineMode, 3> shellSurfaces::refineModeNames_; void Foam::shellSurfaces::setAndCheckLevels ( - const scalar shellI, + const label shellI, const List<Tuple2<scalar, label> >& distLevels ) { diff --git a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H index 0ec93cbeb19f2eb5b40d597bb45d116a5035acd4..778e9031db7e8e35620cc483e2047c2ce26889f7 100644 --- a/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H +++ b/src/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.H @@ -97,7 +97,7 @@ private: //- Helper function for initialisation. void setAndCheckLevels ( - const scalar shellI, + const label shellI, const List<Tuple2<scalar, label> >& ); diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C index e528359aa86135e50d2675d3d5bc98062b6c5f65..cefdb9010014aadaed0e051b2061b5fcf2310a01 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C @@ -78,11 +78,14 @@ Type Foam::Table<Type>::value(const scalar x) const i++; } - // Linear interpolation to find value - return + // Linear interpolation to find value. Note constructor needed for + // Table<label> to convert intermediate scalar back to label. + return Type + ( (x - table_[i].first())/(table_[i+1].first() - table_[i].first()) * (table_[i+1].second() - table_[i].second()) - + table_[i].second(); + + table_[i].second() + ); } diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C index 2566941f242e064abbfa1d35eceb95db0ef33f7c..eca0178eb319b0fe12cd06c1fed2fa02dc23f8b6 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.C @@ -98,7 +98,7 @@ Foam::scalar Foam::pairPotential::forceLookup(const scalar r) const { scalar k_rIJ = (r - rMin_)/dr_; - label k(k_rIJ); + label k = label(k_rIJ); if (k < 0) { @@ -135,7 +135,7 @@ Foam::scalar Foam::pairPotential::energyLookup(const scalar r) const { scalar k_rIJ = (r - rMin_)/dr_; - label k(k_rIJ); + label k = label(k_rIJ); if (k < 0) { diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C index e76c2252d476afde8a40196ccdf551bdc4ef140f..11fef3ee17462872c39d862bdb113c6a45b3a133 100644 --- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C +++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.C @@ -32,6 +32,7 @@ License template<class OutputFilter> Foam::IOOutputFilter<OutputFilter>::IOOutputFilter ( + const word& outputFilterName, const objectRegistry& obr, const fileName& dictName, const IOobject::readOption rOpt, @@ -49,7 +50,7 @@ Foam::IOOutputFilter<OutputFilter>::IOOutputFilter IOobject::NO_WRITE ) ), - OutputFilter(OutputFilter::typeName, obr, *this, readFromFiles) + OutputFilter(outputFilterName, obr, *this, readFromFiles) {} diff --git a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H index d166a9ea19888fa4dd6742ad4ffa1fb9dde53555..82a7679846743c70965fc744d5ee1262f5c1b658 100644 --- a/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H +++ b/src/sampling/outputFilters/IOOutputFilter/IOOutputFilter.H @@ -60,7 +60,7 @@ class IOOutputFilter { // Private Member Functions - //- Disallow default bitwise copy construct and assignment + // Disallow default bitwise copy construct and assignment IOOutputFilter(const IOOutputFilter&); void operator=(const IOOutputFilter&); @@ -74,6 +74,7 @@ public: // Allow the possibility to load fields from files IOOutputFilter ( + const word& outputFilterName, const objectRegistry&, const fileName& dictName = OutputFilter::typeName() + "Dict", const IOobject::readOption rOpt = IOobject::MUST_READ, @@ -81,9 +82,8 @@ public: ); - // Destructor - - virtual ~IOOutputFilter(); + //- Destructor + virtual ~IOOutputFilter(); // Member Functions diff --git a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C index 605b946d7cc30b29b5de9539f50094d2a73ec0c9..51ef0cf149bacc82d247950c5c7375d5185a6820 100644 --- a/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C +++ b/src/sampling/outputFilters/OutputFilterFunctionObject/OutputFilterFunctionObject.C @@ -78,6 +78,7 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::start() ( new IOOutputFilter<OutputFilter> ( + name_, time_.lookupObject<objectRegistry>(regionName_), dictName_ ) diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C index b5518732cb988bd8e0184937d0f490f4adafab06..43bdad2e231a88e2d416e0c7361d8fefaf4f5d51 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.C +++ b/src/sampling/sampledSet/sampledSets/sampledSets.C @@ -102,7 +102,7 @@ bool Foam::sampledSets::checkFieldTypes() nFields += grep(symmTensorFields_, fieldTypes); nFields += grep(tensorFields_, fieldTypes); - if (Pstream::master) + if (Pstream::master()) { if (debug) { diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.C b/src/turbulenceModels/incompressible/LES/laminar/laminar.C index a57d5912d529fa01a9eafb070c979ac3fdb1e0ef..aeff8d3ec17570e32d7e84c2c5827bcdc0dc7d39 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.C @@ -26,7 +26,6 @@ License #include "laminar.H" #include "addToRunTimeSelectionTable.H" -#include "wallDist.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict index 285f41a8438936f0aa4945a4d1dda19ed06a48c0..5f75f1a76ddf1691f69796712f10ba8a2ec10238 100644 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict +++ b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/bottomAir/changeDictionaryDict @@ -61,7 +61,7 @@ dictionaryReplacement } bottomAir_to_leftSolid { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName leftSolid; neighbourPatchName leftSolid_to_bottomAir; neighbourFieldName T; @@ -71,7 +71,7 @@ dictionaryReplacement } bottomAir_to_heater { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName heater; neighbourPatchName heater_to_bottomAir; neighbourFieldName T; @@ -80,7 +80,7 @@ dictionaryReplacement } bottomAir_to_rightSolid { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName rightSolid; neighbourPatchName rightSolid_to_bottomAir; neighbourFieldName T; @@ -254,49 +254,49 @@ dictionaryReplacement p { - internalField uniform 1000000; + internalField uniform 100000; boundaryField { minX { type calculated; - value uniform 1000000; + value uniform 100000; } maxX { type calculated; - value uniform 1000000; + value uniform 100000; } minY { type calculated; - value uniform 1000000; + value uniform 100000; } minZ { type calculated; - value uniform 1000000; + value uniform 100000; } maxZ { type calculated; - value uniform 1000000; + value uniform 100000; } bottomAir_to_leftSolid { type calculated; - value uniform 1000000; + value uniform 100000; } bottomAir_to_heater { type calculated; - value uniform 1000000; + value uniform 100000; } bottomAir_to_rightSolid { type calculated; - value uniform 1000000; + value uniform 100000; } } } diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/changeDictionaryDict deleted file mode 100644 index 56a984c7d79fe0905dadedba30cadee68ca322e6..0000000000000000000000000000000000000000 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/changeDictionaryDict +++ /dev/null @@ -1,192 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object changeDictionaryDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dictionaryReplacement -{ - T - { - internalField uniform 300; - - boundaryField - { - minY - { - type fixedValue; - value uniform 500; - } - - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - - heater_to_domain0 - { - type solidWallHeatFluxTemperatureCoupled; - neighbourRegionName domain0; - neighbourPatchName domain0_to_heater; - neighbourFieldName T; - K K; - value uniform 300; - - } - heater_to_solid1 - { - type solidWallHeatFluxTemperatureCoupled; - neighbourRegionName solid1; - neighbourPatchName solid1_to_heater; - neighbourFieldName T; - K K; - value uniform 300; - } - heater_to_solid3 - { - type solidWallHeatFluxTemperatureCoupled; - neighbourRegionName solid3; - neighbourPatchName solid3_to_heater; - neighbourFieldName T; - K K; - value uniform 300; - } - heater_to_domain3 - { - type solidWallHeatFluxTemperatureCoupled; - neighbourRegionName domain3; - neighbourPatchName domain3_to_heater; - neighbourFieldName T; - K K; - value uniform 300; - } - } - } - - rho - { - internalField uniform 8000; - - boundaryField - { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_domain0 - { - type zeroGradient; - } - heater_to_solid1 - { - type zeroGradient; - } - heater_to_solid3 - { - type zeroGradient; - } - heater_to_domain3 - { - type zeroGradient; - } - } - } - - K - { - internalField uniform 80; - - boundaryField - { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_domain0 - { - type zeroGradient; - } - heater_to_solid1 - { - type zeroGradient; - } - heater_to_solid3 - { - type zeroGradient; - } - heater_to_domain3 - { - type zeroGradient; - } - } - } - - cp - { - internalField uniform 450; - - boundaryField - { - minY - { - type zeroGradient; - } - minZ - { - type zeroGradient; - } - maxZ - { - type zeroGradient; - } - heater_to_domain0 - { - type zeroGradient; - } - heater_to_solid1 - { - type zeroGradient; - } - heater_to_solid3 - { - type zeroGradient; - } - heater_to_domain3 - { - type zeroGradient; - } - } - } -} - -// ************************************************************************* // diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSchemes b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSchemes deleted file mode 100644 index 1c38514090a429a2e0338c814693e4917b601438..0000000000000000000000000000000000000000 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSchemes +++ /dev/null @@ -1,59 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object fvSchemes; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -ddtSchemes -{ - default Euler; -} - -gradSchemes -{ - default Gauss linear; - grad(U) Gauss linear; - grad(gamma) Gauss linear; -} - -divSchemes -{ - div(rho*phi,U) Gauss upwind; //limitedLinearV 1; - div(phi,gamma) Gauss vanLeer; - div(phirb,gamma) Gauss interfaceCompression; -} - -laplacianSchemes -{ - default Gauss linear corrected; -} - -interpolationSchemes -{ - default linear; -} - -snGradSchemes -{ - default corrected; -} - -fluxRequired -{ - default no; - pd; - pcorr; - gamma; -} - -// ************************************************************************* // diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSolution b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSolution deleted file mode 100644 index a77e8bcd8f196d557d62d2ffbc0ef4c393e020ce..0000000000000000000000000000000000000000 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/fvSolution +++ /dev/null @@ -1,123 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object fvSolution; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -solvers -{ - pcorr PCG - { - preconditioner GAMG - { - tolerance 1e-3; - relTol 0; - - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - nBottomSweeps 2; - - cacheAgglomeration false; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; - - tolerance 1e-4; - relTol 0; - maxIter 100; - }; - - pd GAMG - { - tolerance 1e-8; - relTol 0.05; - - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - nFinestSweeps 2; - - cacheAgglomeration false; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; - - pdFinal PCG - { - preconditioner GAMG - { - tolerance 1e-8; - relTol 0; - - nVcycles 2; - - smoother GaussSeidel; - nPreSweeps 0; - nPostSweeps 2; - nFinestSweeps 2; - - cacheAgglomeration false; - nCellsInCoarsestLevel 10; - agglomerator faceAreaPair; - mergeLevels 1; - }; - - tolerance 1e-8; - relTol 0; - maxIter 20; - }; - - U smoothSolver - { - smoother GaussSeidel; - tolerance 1e-6; - relTol 0; - nSweeps 1; - }; - - k PBiCG - { - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - B PBiCG - { - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; - nuTilda PBiCG - { - preconditioner DILU; - tolerance 1e-08; - relTol 0; - }; -} - -PISO -{ - momentumPredictor no; - nCorrectors 3; - nNonOrthogonalCorrectors 0; - nGammaCorr 1; - nGammaSubCycles 3; - cGamma 1; - pdRefCell 0; - pdRefValue 0; -} - -// ************************************************************************* // diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict index b4226ef4844a0fdb5eb834a3a8907bb4cde64608..92038e31df8fd503518e3a30e581e9d16756227c 100644 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict +++ b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/heater/changeDictionaryDict @@ -39,7 +39,7 @@ dictionaryReplacement heater_to_bottomAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName bottomAir; neighbourPatchName bottomAir_to_heater; neighbourFieldName T; @@ -49,7 +49,7 @@ dictionaryReplacement } heater_to_leftSolid { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName leftSolid; neighbourPatchName leftSolid_to_heater; neighbourFieldName T; @@ -58,7 +58,7 @@ dictionaryReplacement } heater_to_rightSolid { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName rightSolid; neighbourPatchName rightSolid_to_heater; neighbourFieldName T; @@ -67,7 +67,7 @@ dictionaryReplacement } heater_to_topAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName topAir; neighbourPatchName topAir_to_heater; neighbourFieldName T; diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict index 86ac71c3cb0286947e32e15704e3a418dbd8d284..c30a9b5c4bb180f2b7541a0cbaefa68c62791b40 100644 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict +++ b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/leftSolid/changeDictionaryDict @@ -36,7 +36,7 @@ dictionaryReplacement } leftSolid_to_bottomAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName bottomAir; neighbourPatchName bottomAir_to_leftSolid; neighbourFieldName T; @@ -46,7 +46,7 @@ dictionaryReplacement } leftSolid_to_heater { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName heater; neighbourPatchName heater_to_leftSolid; neighbourFieldName T; @@ -55,7 +55,7 @@ dictionaryReplacement } leftSolid_to_topAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName topAir; neighbourPatchName topAir_to_leftSolid; neighbourFieldName T; diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict index b27b29bfcdc0de7ca1e8856defe9732399f1eca9..292f92f1d3b4efdd81831370545adc34357fd586 100644 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict +++ b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/rightSolid/changeDictionaryDict @@ -36,7 +36,7 @@ dictionaryReplacement } rightSolid_to_heater { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName heater; neighbourPatchName heater_to_rightSolid; neighbourFieldName T; @@ -45,7 +45,7 @@ dictionaryReplacement } rightSolid_to_bottomAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName bottomAir; neighbourPatchName bottomAir_to_rightSolid; neighbourFieldName T; @@ -54,7 +54,7 @@ dictionaryReplacement } rightSolid_to_topAir { - type solidWallHeatFluxTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName topAir; neighbourPatchName topAir_to_rightSolid; neighbourFieldName T; diff --git a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict index 058056571ae270fc3a3a9078f991c2748bc5803f..e13083daa743d89571b74dfcac14d8605ea0b60b 100644 --- a/tutorials/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict +++ b/tutorials/chtMultiRegionFoam/multiRegionHeater/system/topAir/changeDictionaryDict @@ -62,7 +62,7 @@ dictionaryReplacement } topAir_to_leftSolid { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName leftSolid; neighbourPatchName leftSolid_to_topAir; neighbourFieldName T; @@ -72,7 +72,7 @@ dictionaryReplacement } topAir_to_heater { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName heater; neighbourPatchName heater_to_topAir; neighbourFieldName T; @@ -81,7 +81,7 @@ dictionaryReplacement } topAir_to_rightSolid { - type solidWallTemperatureCoupled; + type solidWallMixedTemperatureCoupled; neighbourRegionName rightSolid; neighbourPatchName rightSolid_to_topAir; neighbourFieldName T; @@ -263,50 +263,50 @@ dictionaryReplacement p { - internalField uniform 1000000; + internalField uniform 100000; boundaryField { minX { type calculated; - value uniform 1000000; + value uniform 100000; } maxX { type calculated; - value uniform 1000000; + value uniform 100000; } maxY { type calculated; - value uniform 1000000; + value uniform 100000; } minZ { type calculated; - value uniform 1000000; + value uniform 100000; } maxZ { type calculated; - value uniform 1000000; + value uniform 100000; } topAir_to_leftSolid { type calculated; - value uniform 1000000; + value uniform 100000; } topAir_to_heater { type calculated; - value uniform 1000000; + value uniform 100000; } topAir_to_rightSolid { type calculated; - value uniform 1000000; + value uniform 100000; } } } diff --git a/wmake/rules/General/flex++ b/wmake/rules/General/flex++ index 823649beababbba8eba77924ed143e07b2536f37..6f68d78001b65064e3407c2d4bf0453d271384f9 100644 --- a/wmake/rules/General/flex++ +++ b/wmake/rules/General/flex++ @@ -1,6 +1,6 @@ .SUFFIXES: .L -Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@ +Ltoo = flex --c++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@ .L.dep: $(MAKE_DEP)