diff --git a/src/OSspecific/POSIX/signals/sigFpe.C b/src/OSspecific/POSIX/signals/sigFpe.C index 921e1345d75bb30b7e86d2789f3837afd021e691..09ebf619777dab0763fa36a1d54af55fd2bf36ce 100644 --- a/src/OSspecific/POSIX/signals/sigFpe.C +++ b/src/OSspecific/POSIX/signals/sigFpe.C @@ -237,10 +237,8 @@ void Foam::sigFpe::unset(const bool verbose) if (sigaction(SIGFPE, &oldAction_, NULL) < 0) { - FatalErrorIn - ( - "Foam::sigFpe::unset(const bool)" - ) << "Cannot reset SIGFPE trapping" + FatalErrorInFunction + << "Cannot reset SIGFPE trapping" << abort(FatalError); } @@ -254,10 +252,8 @@ void Foam::sigFpe::unset(const bool verbose) if (oldExcept == -1) { - FatalErrorIn - ( - "sigFpe::unset(const bool)" - ) << "Cannot reset SIGFPE trapping" + FatalErrorInFunction + << "Cannot reset SIGFPE trapping" << abort(FatalError); } sigFpeActive_ = false; diff --git a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C index 5534767806434bb1a6cb752eb49630f37318cbc3..5933300ee83f0f3e1c4406e8c5c3f7a84c3e2da8 100644 --- a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C +++ b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.C @@ -52,8 +52,10 @@ void noPyrolysis::constructThermoChemistry() basicSolidChemistryModel::New(regionMesh()).ptr() ); - solidThermo_.reset(&solidChemistry_->solidThermo()); - radiation_.reset(radiation::radiationModel::New(solidThermo_->T()).ptr()); + radiation_.reset(radiation::radiationModel::New + ( + solidChemistry_->solidThermo().T() + ).ptr()); } @@ -96,7 +98,6 @@ noPyrolysis::noPyrolysis : pyrolysisModel(mesh, regionType), solidChemistry_(NULL), - solidThermo_(NULL), radiation_(NULL) { if (active()) @@ -116,7 +117,6 @@ noPyrolysis::noPyrolysis : pyrolysisModel(mesh, regionType), solidChemistry_(NULL), - solidThermo_(NULL), radiation_(NULL) { if (active()) @@ -148,19 +148,19 @@ void noPyrolysis::evolveRegion() const volScalarField& noPyrolysis::rho() const { - return solidThermo_->rho(); + return solidChemistry_->solidThermo().rho(); } const volScalarField& noPyrolysis::T() const { - return solidThermo_->T(); + return solidChemistry_->solidThermo().T(); } const tmp<volScalarField> noPyrolysis::Cp() const { - return solidThermo_->Cp(); + return solidChemistry_->solidThermo().Cp(); } @@ -172,7 +172,7 @@ tmp<volScalarField> noPyrolysis::kappaRad() const tmp<volScalarField> noPyrolysis::kappa() const { - return solidThermo_->kappa(); + return solidChemistry_->solidThermo().kappa(); } diff --git a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.H b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.H index 9107456be24125e4f2d53f604cb39fad340f59e8..b7220ce97d4fd1c6d0c33f876f61c52b037b3ce2 100644 --- a/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.H +++ b/src/regionModels/pyrolysisModels/noPyrolysis/noPyrolysis.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,13 +81,10 @@ protected: //- Reset solidChemistryModel and solidThermo pointers void constructThermoChemistry(); - //- Reference to the solid chemistry model + //- Pointer to the solid chemistry model autoPtr<basicSolidChemistryModel> solidChemistry_; - //- Reference to solid thermo - autoPtr<solidReactionThermo> solidThermo_; - - //- Pointer to radiation model + //- Pointer to radiation model autoPtr<radiation::radiationModel> radiation_; diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C index db59153cb01a0c2ceefc732fb03f2522d594a7c4..392f9f25213132ea56944affadba4eee0c7e2c13 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModelCollection.C @@ -53,7 +53,6 @@ namespace pyrolysisModels pyrolysisModelCollection::pyrolysisModelCollection(const fvMesh& mesh) : PtrList<pyrolysisModel>() - { IOdictionary pyrolysisZonesDict ( @@ -162,12 +161,9 @@ scalar pyrolysisModelCollection::maxDiff() const scalar maxDiff = 0.0; forAll(*this, i) { - if (maxDiff < this->operator[](i).maxDiff()) - { - maxDiff = this->operator[](i).maxDiff(); - } - + maxDiff = max(maxDiff, this->operator[](i).maxDiff()); } + return maxDiff; } @@ -175,16 +171,9 @@ scalar pyrolysisModelCollection::maxDiff() const scalar pyrolysisModelCollection::solidRegionDiffNo() const { scalar totalDiNum = GREAT; - forAll(*this, i) { - if - ( - totalDiNum > this->operator[](i).solidRegionDiffNo() - ) - { - totalDiNum = this->operator[](i).solidRegionDiffNo(); - } + totalDiNum = min(totalDiNum, this->operator[](i).solidRegionDiffNo()); } return totalDiNum; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index 8bf37add3a0923f2bb929296f1fb66bf94011f8e..7f7e8eb060abbfe88f052765918971c1d38c01ce 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -38,6 +38,7 @@ inclinedFilmNusseltHeightFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), + filmRegionName_("surfaceFilmProperties"), GammaMean_(), a_(), omega_() @@ -54,6 +55,7 @@ inclinedFilmNusseltHeightFvPatchScalarField ) : fixedValueFvPatchScalarField(ptf, p, iF, mapper), + filmRegionName_(ptf.filmRegionName_), GammaMean_(ptf.GammaMean_().clone().ptr()), a_(ptf.a_().clone().ptr()), omega_(ptf.omega_().clone().ptr()) @@ -69,6 +71,10 @@ inclinedFilmNusseltHeightFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), + filmRegionName_ + ( + dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + ), GammaMean_(DataEntry<scalar>::New("GammaMean", dict)), a_(DataEntry<scalar>::New("a", dict)), omega_(DataEntry<scalar>::New("omega", dict)) @@ -84,6 +90,7 @@ inclinedFilmNusseltHeightFvPatchScalarField ) : fixedValueFvPatchScalarField(wmfrhpsf), + filmRegionName_(wmfrhpsf.filmRegionName_), GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()), a_(wmfrhpsf.a_().clone().ptr()), omega_(wmfrhpsf.omega_().clone().ptr()) @@ -98,6 +105,7 @@ inclinedFilmNusseltHeightFvPatchScalarField ) : fixedValueFvPatchScalarField(wmfrhpsf, iF), + filmRegionName_(wmfrhpsf.filmRegionName_), GammaMean_(wmfrhpsf.GammaMean_().clone().ptr()), a_(wmfrhpsf.a_().clone().ptr()), omega_(wmfrhpsf.omega_().clone().ptr()) @@ -118,10 +126,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() // retrieve the film region from the database const regionModels::regionModel& region = - db().time().lookupObject<regionModels::regionModel> - ( - "surfaceFilmProperties" - ); + db().time().lookupObject<regionModels::regionModel>(filmRegionName_); const regionModels::surfaceFilmModels::kinematicSingleLayer& film = dynamic_cast @@ -134,8 +139,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() // note: normal pointing into the domain const vectorField n(-patch().nf()); - // TODO: currently re-evaluating the entire gTan field to return this patch - const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); + const scalarField gTan(film.gTan(patchI) & n); if (patch().size() && (max(mag(gTan)) < SMALL)) { @@ -190,6 +194,13 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::write ) const { fixedValueFvPatchScalarField::write(os); + writeEntryIfDifferent<word> + ( + os, + "filmRegion", + "surfaceFilmProperties", + filmRegionName_ + ); GammaMean_->writeData(os); a_->writeData(os); omega_->writeData(os); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H index 7be767718db0dc2eb86d7ebd483f4c78a43e4316..861797a3593ceb9d4c3621e8a689c4e2a857bc14 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,6 +56,9 @@ class inclinedFilmNusseltHeightFvPatchScalarField { // Private data + //- Name of film region + word filmRegionName_; + //- Mean mass flow rate per unit length [kg/s/m] autoPtr<DataEntry<scalar> > GammaMean_; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index a49c093b380528d1a41f404c5a395b98a5e418df..1636590f958cbfce409ada74d19f2c166656b258 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -38,6 +38,7 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF), + filmRegionName_("surfaceFilmProperties"), GammaMean_(), a_(), omega_() @@ -54,6 +55,7 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(ptf, p, iF, mapper), + filmRegionName_(ptf.filmRegionName_), GammaMean_(ptf.GammaMean_().clone().ptr()), a_(ptf.a_().clone().ptr()), omega_(ptf.omega_().clone().ptr()) @@ -69,6 +71,10 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(p, iF), + filmRegionName_ + ( + dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + ), GammaMean_(DataEntry<scalar>::New("GammaMean", dict)), a_(DataEntry<scalar>::New("a", dict)), omega_(DataEntry<scalar>::New("omega", dict)) @@ -84,6 +90,7 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(fmfrpvf), + filmRegionName_(fmfrpvf.filmRegionName_), GammaMean_(fmfrpvf.GammaMean_().clone().ptr()), a_(fmfrpvf.a_().clone().ptr()), omega_(fmfrpvf.omega_().clone().ptr()) @@ -98,6 +105,7 @@ inclinedFilmNusseltInletVelocityFvPatchVectorField ) : fixedValueFvPatchVectorField(fmfrpvf, iF), + filmRegionName_(fmfrpvf.filmRegionName_), GammaMean_(fmfrpvf.GammaMean_().clone().ptr()), a_(fmfrpvf.a_().clone().ptr()), omega_(fmfrpvf.omega_().clone().ptr()) @@ -118,10 +126,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() // retrieve the film region from the database const regionModels::regionModel& region = - db().time().lookupObject<regionModels::regionModel> - ( - "surfaceFilmProperties" - ); + db().time().lookupObject<regionModels::regionModel>(filmRegionName_); const regionModels::surfaceFilmModels::kinematicSingleLayer& film = dynamic_cast @@ -133,8 +138,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() // note: normal pointing into the domain const vectorField n(-patch().nf()); - // TODO: currently re-evaluating the entire gTan field to return this patch - const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); + const scalarField gTan(film.gTan(patchI) & n); if (patch().size() && (max(mag(gTan)) < SMALL)) { @@ -186,6 +190,13 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::write ) const { fvPatchVectorField::write(os); + writeEntryIfDifferent<word> + ( + os, + "filmRegion", + "surfaceFilmProperties", + filmRegionName_ + ); GammaMean_->writeData(os); a_->writeData(os); omega_->writeData(os); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H index 211ea77561df22f3910bc90c0895c22fc11b65b6..6d0c22eeb2a342c838bde80bbc413e9347f4972c 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -56,6 +56,9 @@ class inclinedFilmNusseltInletVelocityFvPatchVectorField { // Private data + //- Name of film region + word filmRegionName_; + //- Mean mass flow rate per unit length [kg/s/m] autoPtr<DataEntry<scalar> > GammaMean_; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index e6eb83bc9db59c7ea77509ca8fc1948424117d11..1c0bd2cafe492551cba1ee7c41d8ab1485f65e59 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -51,6 +51,7 @@ alphatFilmWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF), + filmRegionName_("surfaceFilmProperties"), B_(5.5), yPlusCrit_(11.05), Cmu_(0.09), @@ -69,6 +70,7 @@ alphatFilmWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(ptf, p, iF, mapper), + filmRegionName_(ptf.filmRegionName_), B_(ptf.B_), yPlusCrit_(ptf.yPlusCrit_), Cmu_(ptf.Cmu_), @@ -86,6 +88,10 @@ alphatFilmWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(p, iF, dict), + filmRegionName_ + ( + dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + ), B_(dict.lookupOrDefault("B", 5.5)), yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)), Cmu_(dict.lookupOrDefault("Cmu", 0.09)), @@ -101,6 +107,7 @@ alphatFilmWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(fwfpsf), + filmRegionName_(fwfpsf.filmRegionName_), B_(fwfpsf.B_), yPlusCrit_(fwfpsf.yPlusCrit_), Cmu_(fwfpsf.Cmu_), @@ -117,6 +124,7 @@ alphatFilmWallFunctionFvPatchScalarField ) : fixedValueFvPatchScalarField(fwfpsf, iF), + filmRegionName_(fwfpsf.filmRegionName_), B_(fwfpsf.B_), yPlusCrit_(fwfpsf.yPlusCrit_), Cmu_(fwfpsf.Cmu_), @@ -141,8 +149,7 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag+1; - bool foundFilm = - db().time().foundObject<modelType>("surfaceFilmProperties"); + bool foundFilm = db().time().foundObject<modelType>(filmRegionName_); if (!foundFilm) { @@ -154,7 +161,7 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() // Retrieve phase change mass from surface film model const modelType& filmModel = - db().time().lookupObject<modelType>("surfaceFilmProperties"); + db().time().lookupObject<modelType>(filmRegionName_); const label filmPatchI = filmModel.regionPatchID(patchi); @@ -230,6 +237,13 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() void alphatFilmWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); + writeEntryIfDifferent<word> + ( + os, + "filmRegion", + "surfaceFilmProperties", + filmRegionName_ + ); os.writeKeyword("B") << B_ << token::END_STATEMENT << nl; os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl; os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H index de61d62b946aee8d87a98cc374e97acb5974089f..aa21fd9f9abe16f25bce429a3d6f017fb314e811 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.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-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,9 @@ protected: // Protected data + //- Name of film region + word filmRegionName_; + //- B Coefficient (default = 5.5) scalar B_; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C index 2b6727b91f3df9304d541007f1bf3687c73ebc16..e5642bdbfdc1b003539b563a68ca3d9898a0da8e 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C @@ -53,8 +53,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau typedef regionModels::surfaceFilmModels::surfaceFilmModel modelType; - bool foundFilm = - db().time().foundObject<modelType>("surfaceFilmProperties"); + bool foundFilm = db().time().foundObject<modelType>(filmRegionName_); if (!foundFilm) { @@ -66,7 +65,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau // Retrieve phase change mass from surface film model const modelType& filmModel = - db().time().lookupObject<modelType>("surfaceFilmProperties"); + db().time().lookupObject<modelType>(filmRegionName_); const label filmPatchI = filmModel.regionPatchID(patchi); @@ -158,6 +157,7 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(p, iF), + filmRegionName_("surfaceFilmProperties"), B_(5.5), yPlusCrit_(11.05) {} @@ -172,6 +172,7 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(ptf, p, iF, mapper), + filmRegionName_(ptf.filmRegionName_), B_(5.5), yPlusCrit_(11.05) {} @@ -185,6 +186,10 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(p, iF, dict), + filmRegionName_ + ( + dict.lookupOrDefault<word>("filmRegion", "surfaceFilmProperties") + ), B_(dict.lookupOrDefault("B", 5.5)), yPlusCrit_(dict.lookupOrDefault("yPlusCrit", 11.05)) {} @@ -196,6 +201,7 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(wfpsf), + filmRegionName_(wfpsf.filmRegionName_), B_(wfpsf.B_), yPlusCrit_(wfpsf.yPlusCrit_) {} @@ -208,6 +214,7 @@ nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField ) : nutkWallFunctionFvPatchScalarField(wfpsf, iF), + filmRegionName_(wfpsf.filmRegionName_), B_(wfpsf.B_), yPlusCrit_(wfpsf.yPlusCrit_) {} @@ -240,6 +247,13 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::yPlus() const void nutkFilmWallFunctionFvPatchScalarField::write(Ostream& os) const { fvPatchField<scalar>::write(os); + writeEntryIfDifferent<word> + ( + os, + "filmRegion", + "surfaceFilmProperties", + filmRegionName_ + ); writeLocalEntries(os); os.writeKeyword("B") << B_ << token::END_STATEMENT << nl; os.writeKeyword("yPlusCrit") << yPlusCrit_ << token::END_STATEMENT << nl; diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H index 9eb4c5e191c44fc2a2f7e88a8d6dcc931850f3eb..ef35a4c2e7be4d6efaa5e442a5579334efee39c8 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.H @@ -51,8 +51,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H -#define compressibleNutSpalartAllmarasWallFunctionFvPatchScalarField_H +#ifndef nutkFilmWallFunctionFvPatchScalarField_H +#define nutkFilmWallFunctionFvPatchScalarField_H #include "nutkWallFunctionFvPatchScalarField.H" @@ -77,6 +77,9 @@ protected: // Protected data + //- Name of film region + word filmRegionName_; + //- B Coefficient (default = 5.5) scalar B_; diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index b881553f5c7063aa955395f2ac5162fa819afd9b..dabe46ebe6eccc8ca390aad4fdf6f67bc0f50cce 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -140,6 +140,13 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields() // update addedMassTotal counter if (time().outputTime()) { + if (debug) + { + rhoSp_.write(); + USp_.write(); + pSp_.write(); + } + scalar addedMassTotal = 0.0; outputProperties().readIfPresent("addedMassTotal", addedMassTotal); addedMassTotal += returnReduce(addedMassTotal_, sumOp<scalar>()); @@ -233,7 +240,7 @@ void kinematicSingleLayer::continuityCheck() fvc::domainIntegrate(mag(mass - magSf()*deltaRho0))/totalMass ).value(); - const scalar globalContErr = + const scalar globalContErr = ( fvc::domainIntegrate(mass - magSf()*deltaRho0)/totalMass ).value(); @@ -422,6 +429,9 @@ void kinematicSingleLayer::solveThickness U_.correctBoundaryConditions(); + // Update film wall and surface velocities + updateSurfaceVelocities(); + // Continuity check continuityCheck(); } @@ -865,6 +875,10 @@ void kinematicSingleLayer::preEvolveRegion() transferPrimaryRegionSourceFields(); + updateSurfaceVelocities(); + + correctAlpha(); + // Reset transfer fields // availableMass_ = mass(); availableMass_ = netMass(); @@ -880,12 +894,6 @@ void kinematicSingleLayer::evolveRegion() Info<< "kinematicSingleLayer::evolveRegion()" << endl; } - // Update film coverage indicator - correctAlpha(); - - // Update film wall and surface velocities - updateSurfaceVelocities(); - // Update sub-models to provide updated source contributions updateSubmodels(); @@ -913,6 +921,15 @@ void kinematicSingleLayer::evolveRegion() // Update deltaRho_ with new delta_ deltaRho_ == delta_*rho_; +} + + +void kinematicSingleLayer::postEvolveRegion() +{ + if (debug) + { + Info<< "kinematicSingleLayer::postEvolveRegion()" << endl; + } // Reset source terms for next time integration resetPrimaryRegionSourceTerms(); @@ -933,7 +950,7 @@ scalar kinematicSingleLayer::CourantNumber() const forAll(delta_, i) { - if (delta_[i] > deltaCoLimit_) + if ((delta_[i] > deltaCoLimit_) && (alpha_[i] > 0.5)) { CoNum = max(CoNum, sumPhi[i]/(delta_[i]*magSf()[i])); } diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H index ace33f055a1aaf14c3c72bc03efcb92f847c5be2..03fdd4a4cdde5636fae57d43062a39d5cc81359d 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -495,6 +495,9 @@ public: //- Return the gravity tangential component contributions inline tmp<volVectorField> gTan() const; + //- Return the gravity tangential component contributions for patchI + inline tmp<vectorField> gTan(const label patchI) const; + // Evolution @@ -504,6 +507,9 @@ public: //- Evolve the film equations virtual void evolveRegion(); + //- Post-evolve film hook + virtual void postEvolveRegion(); + // Source fields diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H index 39c95ba8cde5fccccb436eb4706fbd911efc9c45..10ac6837edf79c689cbb4cfcca30febef9404506 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -190,7 +190,7 @@ inline const filmTurbulenceModel& kinematicSingleLayer::turbulence() const inline tmp<volScalarField> kinematicSingleLayer::mass() const { - return rho_*delta_*magSf(); + return deltaRho_*magSf(); } @@ -199,7 +199,7 @@ inline tmp<volScalarField> kinematicSingleLayer::netMass() const return fvc::surfaceSum(pos(phi_)*phi_/(fvc::interpolate(delta_) + deltaSmall_)) *time().deltaT() - + rho_*delta_*magSf(); + + deltaRho_*magSf(); } @@ -280,6 +280,18 @@ inline tmp<volVectorField> kinematicSingleLayer::gTan() const return tgTan; } +inline tmp<vectorField> kinematicSingleLayer::gTan +( + const label patchI +) const +{ + const vectorField& nH = nHat().boundaryField()[patchI]; + const vector& g = g_.value(); + tmp<vectorField> tgTan(new vectorField(g - nH*(g & nH))); + + return tgTan; +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index c846a98d5837372a13fe91a7b3f1a0e17c15f58a..79068a7954fe0d894bdb50c4631b3ffcbdc97b94 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -258,10 +258,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const if (useReferenceValues_) { - forAll(rho, cellI) - { - rho[cellI] = this->rho(pRef_, TRef_); - } + rho = this->rho(pRef_, TRef_); } else { @@ -306,10 +303,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const if (useReferenceValues_) { - forAll(mu, cellI) - { - mu[cellI] = this->mu(pRef_, TRef_); - } + mu = this->mu(pRef_, TRef_); } else { @@ -354,10 +348,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const if (useReferenceValues_) { - forAll(sigma, cellI) - { - sigma[cellI] = this->sigma(pRef_, TRef_); - } + sigma = this->sigma(pRef_, TRef_); } else { @@ -402,10 +393,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const if (useReferenceValues_) { - forAll(Cp, cellI) - { - Cp[cellI] = this->Cp(pRef_, TRef_); - } + Cp = this->Cp(pRef_, TRef_); } else { @@ -450,10 +438,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const if (useReferenceValues_) { - forAll(kappa, cellI) - { - kappa[cellI] = this->kappa(pRef_, TRef_); - } + kappa = this->kappa(pRef_, TRef_); } else { diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C index 0d681da0080f0cbea67a5d7b842cfc04079ac0dd..795a2fcb7a5d7b77cf01cdedda5ceb6ddec6f612 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/thermocapillaryForce/thermocapillaryForce.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -63,12 +63,13 @@ thermocapillaryForce::~thermocapillaryForce() tmp<fvVectorMatrix> thermocapillaryForce::correct(volVectorField& U) { + const volScalarField& alpha = owner_.alpha(); const volScalarField& sigma = owner_.sigma(); tmp<fvVectorMatrix> tfvm(new fvVectorMatrix(U, dimForce/dimArea*dimVolume)); - tfvm() += fvc::grad(sigma); + tfvm() += alpha*fvc::grad(sigma); return tfvm; } diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 03b6de267ae1e73bb47550c9037a33df6cf2f4dc..11e0ae03077f095c897fb5dbd862fcd7a7076011 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -27,6 +27,7 @@ License #include "fvcDiv.H" #include "fvcLaplacian.H" #include "fvm.H" +#include "fvcDdt.H" #include "addToRunTimeSelectionTable.H" #include "zeroGradientFvPatchFields.H" #include "mappedFieldFvPatchField.H" @@ -188,6 +189,14 @@ void thermoSingleLayer::transferPrimaryRegionSourceFields() // Apply enthalpy source as difference between incoming and actual states hsSp_ -= rhoSp_*hs_; + + if (time().outputTime()) + { + if (debug) + { + hsSp_.write(); + } + } } @@ -231,10 +240,12 @@ void thermoSingleLayer::updateSubmodels() htcs_->correct(); htcw_->correct(); + scalarField availableMass(alpha_*availableMass_); + phaseChange_->correct ( time_.deltaTValue(), - availableMass_, + availableMass, primaryMassPCTrans_, primaryEnergyPCTrans_ ); @@ -256,6 +267,12 @@ void thermoSingleLayer::updateSubmodels() tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const { +// Only apply heat transfer where the film is present +// - leads to temperature unboundedness? +// volScalarField boundedAlpha(max(alpha_, ROOTVSMALL)); +// volScalarField htcst(htcs_->h()*boundedAlpha); +// volScalarField htcwt(htcw_->h()*boundedAlpha); + return ( - fvm::Sp(htcs_->h()/Cp_, hs) @@ -274,7 +291,13 @@ void thermoSingleLayer::solveEnergy() Info<< "thermoSingleLayer::solveEnergy()" << endl; } - updateSurfaceTemperatures(); + + dimensionedScalar residualDeltaRho + ( + "residualDeltaRho", + deltaRho_.dimensions(), + 1e-10 + ); solve ( @@ -282,16 +305,21 @@ void thermoSingleLayer::solveEnergy() + fvm::div(phi_, hs_) == - hsSp_ - + q(hs_) - + radiation_->Shs() + + alpha_*q(hs_) + + alpha_*radiation_->Shs() // - fvm::SuSp(rhoSp_, hs_) - rhoSp_*hs_ + + fvc::ddt(residualDeltaRho + deltaRho_, hs_) + - fvm::ddt(residualDeltaRho + deltaRho_, hs_) ); correctThermoFields(); // evaluate viscosity from user-model viscosity_->correct(pPrimary_, T_); + + // Update film wall and surface temperatures + updateSurfaceTemperatures(); } @@ -611,10 +639,10 @@ void thermoSingleLayer::preEvolveRegion() Info<< "thermoSingleLayer::preEvolveRegion()" << endl; } -// correctHsForMappedT(); - kinematicSingleLayer::preEvolveRegion(); + updateSurfaceTemperatures(); + // Update phase change primaryMassPCTrans_ == dimensionedScalar("zero", dimMass, 0.0); primaryEnergyPCTrans_ == dimensionedScalar("zero", dimEnergy, 0.0); @@ -628,15 +656,6 @@ void thermoSingleLayer::evolveRegion() Info<< "thermoSingleLayer::evolveRegion()" << endl; } - // Update film coverage indicator - correctAlpha(); - - // Update film wall and surface velocities - updateSurfaceVelocities(); - - // Update film wall and surface temperatures - updateSurfaceTemperatures(); - // Update sub-models to provide updated source contributions updateSubmodels(); @@ -670,9 +689,6 @@ void thermoSingleLayer::evolveRegion() // Update temperature using latest hs_ T_ == T(hs_); - - // Reset source terms for next time integration - resetPrimaryRegionSourceTerms(); } @@ -739,7 +755,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho() const ( IOobject ( - "thermoSingleLayer::Srho", + typeName + ":Srho", time().timeName(), primaryMesh(), IOobject::NO_READ, @@ -791,7 +807,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Srho ( IOobject ( - "thermoSingleLayer::Srho(" + Foam::name(i) + ")", + typeName + ":Srho(" + Foam::name(i) + ")", time_.timeName(), primaryMesh(), IOobject::NO_READ, @@ -841,7 +857,7 @@ tmp<DimensionedField<scalar, volMesh> > thermoSingleLayer::Sh() const ( IOobject ( - "thermoSingleLayer::Sh", + typeName + ":Sh", time().timeName(), primaryMesh(), IOobject::NO_READ, diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes index 6ef83f545419a1112c140ba9a251e587fdbeb89c..634cf4ab7d4b25fea1fd5744ad82d7b31f1bf988 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/cylinder/system/wallFilmRegion/fvSchemes @@ -17,48 +17,44 @@ FoamFile ddtSchemes { - default none; - ddt(deltaf*rhof) Euler; - ddt(rhof,deltaf) Euler; - ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hf) Euler; + default Euler; } divSchemes { - default none; - div(phi,Uf) Gauss upwind; + default none; + div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hf) Gauss upwind; + div(phi,hf) Gauss upwind; - div(nHat) Gauss linear; + div(nHat) Gauss linear; div(grad(nHat)) Gauss linear; } gradSchemes { default none; - grad(pL) Gauss linear; - grad(sigmaf) Gauss linear; + grad(pL) Gauss linear; + grad(sigmaf) Gauss linear; snGradCorr(deltaf) Gauss linear; - snGradCorr(pp) Gauss linear; - snGradCorr(pu) Gauss linear; + snGradCorr(pp) Gauss linear; + snGradCorr(pu) Gauss linear; - grad(radius) Gauss linear; - grad(nHat) Gauss linear; + grad(radius) Gauss linear; + grad(nHat) Gauss linear; } laplacianSchemes { - default none; + default none; laplacian(sigmaf,deltaf) Gauss linear uncorrected; laplacian(deltaCoeff,deltaf) Gauss linear uncorrected; } snGradSchemes { - snGrad(p) uncorrected; - snGrad(deltaf) uncorrected; + snGrad(p) uncorrected; + snGrad(deltaf) uncorrected; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes index 183876a3027c28d36378f8e2c5eace99f24bdf13..cdbba66cdafcad1a2fd9b3ddb1573a6db55116df 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/hotBoxes/system/wallFilmRegion.org/fvSchemes @@ -17,11 +17,7 @@ FoamFile ddtSchemes { - default none; - ddt(deltaf*rhof) Euler; - ddt(rhof,deltaf) Euler; - ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hf) Euler; + default Euler; } divSchemes @@ -29,25 +25,25 @@ divSchemes default none; div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hf) Gauss upwind; + div(phi,hf) Gauss upwind; div(nHat) Gauss linear; } gradSchemes { - default none; - grad(pL) Gauss linear; - grad(sigmaf) Gauss linear; + default none; + grad(pL) Gauss linear; + grad(sigmaf) Gauss linear; snGradCorr(deltaf) Gauss linear; - snGradCorr(pp) Gauss linear; - snGradCorr(pu) Gauss linear; - grad(nHat) Gauss linear; - grad(alpha) Gauss linear; + snGradCorr(pp) Gauss linear; + snGradCorr(pu) Gauss linear; + grad(nHat) Gauss linear; + grad(alpha) Gauss linear; } laplacianSchemes { - default none; + default none; laplacian(sigmaf,deltaf) Gauss linear uncorrected; laplacian(deltaCoeff,deltaf) Gauss linear uncorrected; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes index 1482dbb4bf2eed1c88fe58621e9f04a44c3f9769..4296dc18443b33d839e7560742d930aa4128a551 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/rivuletPanel/system/wallFilmRegion/fvSchemes @@ -17,45 +17,41 @@ FoamFile ddtSchemes { - default none; - ddt(deltaf*rhof) Euler; - ddt(rhof,deltaf) Euler; - ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hf) Euler; + default Euler; } divSchemes { - default none; - div(phi,Uf) Gauss upwind; + default none; + div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes { - default none; - grad(pL) Gauss linear; - grad(sigmaf) Gauss linear; + default none; + grad(pL) Gauss linear; + grad(sigmaf) Gauss linear; snGradCorr(deltaf) Gauss linear; - snGradCorr(pp) Gauss linear; - snGradCorr(pu) Gauss linear; - grad(nHat) Gauss linear; + snGradCorr(pp) Gauss linear; + snGradCorr(pu) Gauss linear; + grad(nHat) Gauss linear; - grad(alpha) Gauss linear; + grad(alpha) Gauss linear; } laplacianSchemes { - default none; + default none; laplacian(sigmaf,deltaf) Gauss linear orthogonal; laplacian(deltaCoeff,deltaf) Gauss linear orthogonal; } snGradSchemes { - snGrad(p) orthogonal; - snGrad(deltaf) orthogonal; + snGrad(p) orthogonal; + snGrad(deltaf) orthogonal; } diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/p_rgh b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/p_rgh index d8d9be7154c9467b4537553e64ac99e143267649..1c9074482e66376b5a93b9b90ced8cb24f567396 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/p_rgh +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/0.org/p_rgh @@ -23,7 +23,14 @@ boundaryField { sides { - type fixedFluxPressure; + type totalPressure; + p0 $internalField; + U U; + phi phi; + rho rho; + psi none; + gamma 0; + value $internalField; } region0_to_wallFilmRegion_wallFilmFaces { diff --git a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes index 440c34073a49ec6383ab60e91beafc8017458afd..9fbff320c8c1a819550e858f00de2fbdcb95bf87 100644 --- a/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes +++ b/tutorials/lagrangian/reactingParcelFilmFoam/splashPanel/system/wallFilmRegion/fvSchemes @@ -17,43 +17,39 @@ FoamFile ddtSchemes { - default none; - ddt(deltaf*rhof) Euler; - ddt(rhof,deltaf) Euler; - ddt(deltaf*rhof,Uf) Euler; - ddt(deltaf*rhof,hf) Euler; + default Euler; } divSchemes { - default none; - div(phi,Uf) Gauss upwind; + default none; + div(phi,Uf) Gauss upwind; div(phid,deltaf) Gauss upwind; - div(phi,hf) Gauss upwind; + div(phi,hf) Gauss upwind; } gradSchemes { - default none; - grad(pL) Gauss linear; - grad(sigmaf) Gauss linear; + default none; + grad(pL) Gauss linear; + grad(sigmaf) Gauss linear; snGradCorr(deltaf) Gauss linear; - snGradCorr(pp) Gauss linear; - snGradCorr(pu) Gauss linear; - grad(nHat) Gauss linear; + snGradCorr(pp) Gauss linear; + snGradCorr(pu) Gauss linear; + grad(nHat) Gauss linear; } laplacianSchemes { - default none; + default none; laplacian(sigmaf,deltaf) Gauss linear uncorrected; laplacian(deltaCoeff,deltaf) Gauss linear uncorrected; } snGradSchemes { - snGrad(p) uncorrected; - snGrad(deltaf) uncorrected; + snGrad(p) uncorrected; + snGrad(deltaf) uncorrected; }