From dcef9a2843b8176a57a4f3b82dfd47c265e49bc0 Mon Sep 17 00:00:00 2001 From: sergio Date: Fri, 16 Mar 2012 09:28:49 +0000 Subject: [PATCH] DEV: Fiel for enthalpyJump --- .../solvers/heatTransfer/buoyantPimpleFoam/Make/options | 4 +++- .../fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C | 4 +++- src/thermophysicalModels/basic/Make/options | 6 ++++-- src/thermophysicalModels/basic/basicThermo/basicThermo.C | 9 +++++++-- .../basic/rhoThermo/hRhoThermo/hRhoThermo.C | 5 ++++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index 8d01214e6c..69a3f27e44 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -10,4 +10,6 @@ EXE_LIBS = \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ - -lfiniteVolume + -lfiniteVolume \ + -L$(FOAM_USER_LIBBIN) \ + -lFvPatchScalarFieldEnthalpyJump diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index 7d07ca649f..8483524871 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -65,8 +65,10 @@ Foam::tmp > Foam::fvPatchField::New || actualPatchType != p.type() ) { + Info << actualPatchType << endl; + Info << p.type() << endl; typename patchConstructorTable::iterator patchTypeCstrIter = - patchConstructorTablePtr_->find(p.type()); + patchConstructorTablePtr_->find(actualPatchType);//p.type()); if (patchTypeCstrIter != patchConstructorTablePtr_->end()) { diff --git a/src/thermophysicalModels/basic/Make/options b/src/thermophysicalModels/basic/Make/options index 8b8c0733d0..4eba2f1e11 100644 --- a/src/thermophysicalModels/basic/Make/options +++ b/src/thermophysicalModels/basic/Make/options @@ -1,6 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I/home/tom3/sergio/development/chtMultiRegionCoupledFoam/lnInclude LIB_LIBS = \ - -lfiniteVolume + -lfiniteVolume \ + -L$(FOAM_USER_LIBBIN)/FvPatchScalarFieldEnthalpyJump diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 59c0056040..8eed4f2311 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -33,6 +33,7 @@ License #include "fixedInternalEnergyFvPatchScalarField.H" #include "gradientInternalEnergyFvPatchScalarField.H" #include "mixedInternalEnergyFvPatchScalarField.H" +#include "enthalpyJumpFvPatchScalarField.H" /* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */ @@ -64,10 +65,14 @@ Foam::wordList Foam::basicThermo::hBoundaryTypes() { hbt[patchi] = gradientEnthalpyFvPatchScalarField::typeName; } - else if (isA(tbf[patchi])) + else if(isA(tbf[patchi])) { hbt[patchi] = mixedEnthalpyFvPatchScalarField::typeName; } + else if (isA(tbf[patchi])) + { + hbt[patchi] = enthalpyJumpFvPatchScalarField::typeName; + } } return hbt; @@ -85,7 +90,7 @@ void Foam::basicThermo::hBoundaryCorrection(volScalarField& h) refCast(hbf[patchi]).gradient() = hbf[patchi].fvPatchField::snGrad(); } - else if (isA(hbf[patchi])) + else if(isA(hbf[patchi])) { refCast(hbf[patchi]).refGrad() = hbf[patchi].fvPatchField::snGrad(); diff --git a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C index 9d3f3c2ba7..92db569532 100644 --- a/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/hRhoThermo/hRhoThermo.C @@ -118,9 +118,11 @@ Foam::hRhoThermo::hRhoThermo(const fvMesh& mesh) ), mesh, dimEnergy/dimMass, + this->hBoundaryTypes(), this->hBoundaryTypes() ) { + Info << "hBounda" << this->hBoundaryTypes() << endl; scalarField& hCells = h_.internalField(); const scalarField& TCells = this->T_.internalField(); @@ -136,8 +138,9 @@ Foam::hRhoThermo::hRhoThermo(const fvMesh& mesh) } hBoundaryCorrection(h_); - + Info << h_ << endl; calculate(); + }