CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to check Heat Balance in heat transfer like mass balance for flow

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By mahendra
  • 1 Post By mahaputra

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2008, 08:37
Default Dear Foamers hello ! Is the
  #1
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Foamers hello !

Is there any utility to check heat balance in heat transfer cases like we check mass balance for flow using "calcMassFlow" utiliy?

Thanks,
Mahendra.
aamev likes this.
mahendra is offline   Reply With Quote

Old   November 21, 2008, 04:50
Default Hello People ! No replies f
  #2
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Hello People !

No replies for the above post???

Regards,
Mahendra
mahendra is offline   Reply With Quote

Old   November 28, 2008, 01:21
Default hi, At least a comment on t
  #3
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
hi,

At least a comment on the above topic?????

Mahendra.
mahendra is offline   Reply With Quote

Old   December 3, 2008, 05:53
Default Hi Mahendra, There is a uti
  #4
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 35
Rep Power: 17
kati is on a distinguished road
Hi Mahendra,

There is a utility wallHeatFlux, but like the name says, it's only for walls, not for inlets and outlets. There was a problem with such calculation on inlet/outlet boundaries, but I don't remember exactly what - maybe something with the face normal direction? I suppose you can add an estimation to the utility using flux and enthalpy on boundaries, and try to interpret the result.

Regards,
Kati
kati is offline   Reply With Quote

Old   December 3, 2008, 06:13
Default I forgot to mention the utilit
  #5
Member
 
Kati Laakkonen
Join Date: Mar 2009
Location: Espoo, Finland
Posts: 35
Rep Power: 17
kati is on a distinguished road
I forgot to mention the utility is written for hCombustionThermo. Replace hCombustionThermo with hThermo, if you are not using combustion models. You'll also need to add [patchi] to the if statement, i.e.

if (typeid(mesh.boundary()) == typeid(wallFvPatch))

becomes

if (typeid(mesh.boundary()[patchi]) == typeid(wallFvPatch))

Then recompile.

Regards,
Kati
kati is offline   Reply With Quote

Old   December 4, 2008, 02:05
Default Dear Kati, I really appreci
  #6
Member
 
Mahendra
Join Date: Mar 2009
Location: Pune, Maharashtra, India
Posts: 65
Rep Power: 17
mahendra is on a distinguished road
Dear Kati,

I really appreciate for responding, I will try your suggestion and let you know about it.

Thanks,
Mahendra.
mahendra is offline   Reply With Quote

Old   April 25, 2009, 09:57
Default
  #7
Member
 
Nugroho Adi
Join Date: Mar 2009
Location: norway
Posts: 79
Rep Power: 17
mahaputra is on a distinguished road
Quote:
Originally Posted by kati View Post
I forgot to mention the utility is written for hCombustionThermo. Replace hCombustionThermo with hThermo, if you are not using combustion models. You'll also need to add [patchi] to the if statement, i.e.

if (typeid(mesh.boundary()) == typeid(wallFvPatch))

becomes

if (typeid(mesh.boundary()[patchi]) == typeid(wallFvPatch))

Then recompile.

Regards,
Kati
Dear Katti

i modified some scripts in the wallHeatFlux post processing utilities

without change the hCombustionThermo , it successed to compile

but, when i changed the files, followed your instruction, i got these following errors:


simulation15@user-laptop:~/OpenFOAM/OpenFOAM-1.5-dev/applications/utilities/postProcessing/wall/wallHeatFlux$ wclean
simulation15@user-laptop:~/OpenFOAM/OpenFOAM-1.5-dev/applications/utilities/postProcessing/wall/wallHeatFlux$ wmake
Making dependency list for source file wallHeatFlux.C
SOURCE=wallHeatFlux.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/turbulenceModels/RAS -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/specie/lnInclude -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/combustion/lnInclude -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/thermophysicalModels/basic/lnInclude -IlnInclude -I. -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/simulation15/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/wallHeatFlux.o
In file included from wallHeatFlux.C:68:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:1: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class Foam::autoPtr’
createFields.H:1: error: expected a type, got ‘hThermo’
createFields.H:2: error: invalid type in declaration before ‘(’ token
createFields.H:3: error: ‘template<class MixtureType> class Foam::hThermo’ used without template parameters
createFields.H:6: error: base operand of ‘->’ is not a pointer
createFields.H:16: error: base operand of ‘->’ is not a pointer
In file included from wallHeatFlux.C:68:
createFields.H:131: error: ‘thermo’ cannot be used as a function
createFields.H:6: warning: unused variable ‘h’
make: *** [Make/linuxGccDPOpt/wallHeatFlux.o] Error 1
simulation15@user-laptop:~/OpenFOAM/OpenFOAM-1.5-dev/applications/utilities/postProcessing/wall/wallHeatFlux$


i change:

header of wallHeatFlux.C :

#include "fvCFD.H"
//#include "hCombustionThermo.H"
#include "hThermo.H"
#include "compressible/RASModel/RASModel.H"
#include "wallFvPatch.H"


and

createField.H becomes :

autoPtr<hThermo> thermo // autoPtr<hCombustionThermo> thermo
(
hThermo::New(mesh) // hCombustionThermo::New(mesh)
);

const volScalarField& h = thermo->h();


is there something missed?


please give me help


thanks
aamev likes this.
mahaputra is offline   Reply With Quote

Old   May 4, 2009, 05:47
Default
  #8
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mahaputra View Post
Dear Katti

i modified some scripts in the wallHeatFlux post processing utilities

without change the hCombustionThermo , it successed to compile


In file included from wallHeatFlux.C:68:
createFields.H: In function ‘int main(int, char**)’:
createFields.H:1: error: type/value mismatch at argument 1 in template parameter list for ‘template<class T> class Foam::autoPtr’
createFields.H:1: error: expected a type, got ‘hThermo’
createFields.H:2: error: invalid type in declaration before ‘(’ token
createFields.H:3: error: ‘template<class MixtureType> class Foam::hThermo’ used without template parameters


createField.H becomes :

autoPtr<hThermo> thermo // autoPtr<hCombustionThermo> thermo
(
hThermo::New(mesh) // hCombustionThermo::New(mesh)
);

const volScalarField& h = thermo->h();


is there something missed?
The problem is that hThermo is a template. Instead of hThermo change to basicThermo (the superclass of hThermo and hCombustionThermo) and it compiles. Should work, too, but I havn't tested that

Bernhard
gschaider is offline   Reply With Quote

Old   July 28, 2009, 04:56
Default
  #9
New Member
 
Join Date: May 2009
Location: Germany
Posts: 25
Rep Power: 17
Linh.Hoang is on a distinguished road
Dear Foamers,
I changed the Utility wallHeatFlux as mentioned. I´ve got no errors while compiling, but when i tried to use it on my case (impinging jet on a flat plate)
i´ve got following errors:


Selecting RAS turbulence model kEpsilon
#0 Foam::error::printStack(Foam::Ostream&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::compressible::RASModels::kEpsilon::kEpsilon( Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#4 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kEpsilo n>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#5 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#6 main in "/user/hi141/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/wallHeatFlux2"
#7 __libc_start_main in "/lib/libc.so.6"
#8 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/user/hi141/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/wallHeatFlux2"
Floating point exception (core dumped)


Any suggestions whats wrong?

Linh
Linh.Hoang is offline   Reply With Quote

Old   July 28, 2009, 09:38
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Linh.Hoang View Post
Dear Foamers,
I changed the Utility wallHeatFlux as mentioned. I´ve got no errors while compiling, but when i tried to use it on my case (impinging jet on a flat plate)
i´ve got following errors:


Selecting RAS turbulence model kEpsilon
#0 Foam::error:rintStack(Foam::Ostream&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 ?? in "/lib/libc.so.6"
#3 Foam::compressible::RASModels::kEpsilon::kEpsilon( Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#4 Foam::compressible::RASModel::adddictionaryConstru ctorToTable<Foam::compressible::RASModels::kEpsilo n>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#5 Foam::compressible::RASModel::New(Foam::GeometricF ield<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::basicThermo&) in "/user/hi141/OpenFOAM/OpenFOAM-1.5/lib/linux64GccDPOpt/libcompressibleRASModels.so"
#6 main in "/user/hi141/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/wallHeatFlux2"
#7 __libc_start_main in "/lib/libc.so.6"
#8 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/user/hi141/OpenFOAM/OpenFOAM-1.5/applications/bin/linux64GccDPOpt/wallHeatFlux2"
Floating point exception (core dumped)


Any suggestions whats wrong?

Linh
The problem happens while the k-epsilon-model is initialized. Did that case ever successfully run? I doubt it, because everything points to the world-famous "k or epsilon are defined as 0 somewhere (internal field or boundary) and therefor we get a division by 0"-problem that is discussed elsewhere on the forum

Bernhard
gschaider is offline   Reply With Quote

Old   July 28, 2009, 09:59
Default
  #11
New Member
 
Join Date: May 2009
Location: Germany
Posts: 25
Rep Power: 17
Linh.Hoang is on a distinguished road
Hello Bernhard,
thanks for your thoughts.
my case run sucessfully and even the velocity and Temperature looks fine for me. For k and epsilon i´ve got zeroGradient at walls and outlet and for inlet and internalfield a fixed Value. (k=0.19 and epsilon= 8).
That seems right for me. Any other suggestions why it doesen't work?

Linh
Linh.Hoang is offline   Reply With Quote

Old   July 28, 2009, 14:03
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Linh.Hoang View Post
Hello Bernhard,
thanks for your thoughts.
my case run sucessfully and even the velocity and Temperature looks fine for me. For k and epsilon i´ve got zeroGradient at walls and outlet and for inlet and internalfield a fixed Value. (k=0.19 and epsilon= 8).
That seems right for me. Any other suggestions why it doesen't work?

Linh
No idea. I say what I always say in that situation: "Run your stuff in the Debug-Version. This will give the line-number where it happens" Everything else is guesswork
gschaider is offline   Reply With Quote

Old   February 8, 2012, 06:28
Default
  #13
New Member
 
johannes k.
Join Date: Feb 2012
Posts: 3
Rep Power: 14
schalinski is on a distinguished road
ik now, its quite an old thread..but one question:
i've got quite a similar problem, my machine says:

Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.019224, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0170779, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0153836, No Iterations 1
DILUPBiCG: Solving for h, Initial residual = 0.514064, Final residual = 0.00679162, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 9.81448e-05, No Iterations 558
DICPCG: Solving for p, Initial residual = 0.205988, Final residual = 2.04897e-05, No Iterations 142
DICPCG: Solving for p, Initial residual = 0.0258002, Final residual = 2.46229e-06, No Iterations 454
time step continuity errors : sum local = 0.0268867, global = 6.52206e-05, cumulative = 6.52206e-05
rho max/min : 2 2
DILUPBiCG: Solving for omega, Initial residual = 0.999982, Final residual = 0.0668744, No Iterations 2
bounding omega, min: -1369.7 max: 7.94188e+07 average: 420.946
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.0661276, No Iterations 1
ExecutionTime = 743.84 s ClockTime = 751 s

Time = 2

DILUPBiCG: Solving for Ux, Initial residual = 0.147725, Final residual = 0.0122156, No Iterations 3
DILUPBiCG: Solving for Uy, Initial residual = 0.285303, Final residual = 0.00314927, No Iterations 3
DILUPBiCG: Solving for Uz, Initial residual = 0.361735, Final residual = 0.0197595, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 0.426434, Final residual = 0.0386005, No Iterations 2
DICPCG: Solving for p, Initial residual = 0.999999, Final residual = 23.1811, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.833482, Final residual = 0.00709432, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.847285, Final residual = 0.0412215, No Iterations 1001
time step continuity errors : sum local = 9009.91, global = -26.1803, cumulative = -26.1803
rho max/min : 2 2
DILUPBiCG: Solving for omega, Initial residual = 0.99807, Final residual = 0.0959366, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.724922, Final residual = 0.0287185, No Iterations 1
ExecutionTime = 2472.43 s ClockTime = 2487 s

Time = 3

DILUPBiCG: Solving for Ux, Initial residual = 0.300673, Final residual = 0.0115287, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.449886, Final residual = 0.0417425, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.446248, Final residual = 0.0391038, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 0.397656, Final residual = 0.0197622, No Iterations 19
DICPCG: Solving for p, Initial residual = 0.949759, Final residual = 0.000545524, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.0981401, Final residual = 9.80824e-06, No Iterations 908
DICPCG: Solving for p, Initial residual = 0.121937, Final residual = 1.19824e-05, No Iterations 748
time step continuity errors : sum local = 5.62326, global = -0.28192, cumulative = -26.4622
rho max/min : 2 0.001
DILUPBiCG: Solving for omega, Initial residual = 0.494972, Final residual = 0.038501, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.551354, Final residual = 0.0213688, No Iterations 1
ExecutionTime = 4078.91 s ClockTime = 4101 s

Time = 4

DILUPBiCG: Solving for Ux, Initial residual = 0.676072, Final residual = 0.0333149, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.624142, Final residual = 0.0401927, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.605495, Final residual = 0.0382899, No Iterations 2
DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.0459921, No Iterations 2
#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::hPsiThermo<Foam:ureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam:erfectGas> > > > >::calculate() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4 Foam::hPsiThermo<Foam:ureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam:erfectGas> > > > >::correct() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#5
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/rhoSimpleFoam"
#6 __libc_start_main in "/lib/libc.so.6"
#7
in "/opt/openfoam201/platforms/linux64GccDPOpt/bin/rhoSimpleFoam"
Floating point exception (core dumped)

but i've checked all my variables...none is zero!
You're talking about the debug mode, can anyone please help me and tell me what i have to do to run the solver (rhosimplefoam) in debug mode??

Would be great!!
schalinski is offline   Reply With Quote

Old   February 8, 2012, 09:02
Default
  #14
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

I you gess your rho min was too small, or even negative. (see you log).
Try relax for T, and check if all is correct with your thermo setting.

regards,
olivier
olivierG is offline   Reply With Quote

Old   February 8, 2012, 10:58
Default
  #15
New Member
 
johannes k.
Join Date: Feb 2012
Posts: 3
Rep Power: 14
schalinski is on a distinguished road
Quote:
Originally Posted by olivierG View Post
hello,

I you gess your rho min was too small, or even negative. (see you log).
Try relax for T, and check if all is correct with your thermo setting.

regards,
olivier

Ok, thanks for helping, but......what does all that mean?my rho min is 0.001..is that too small?? and what about relax for T, where do i have to do these settings. and the thermo settings? where do i find them? what do i have to write there??

But again...thanks much for help
schalinski is offline   Reply With Quote

Old   February 8, 2012, 11:19
Default
  #16
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
in system/fvSolution, check if you have set rhoMin and rhoMax.

And if the solver still crash, check (always in fvSolution) the relaxationFactors for h and rho: try a lower value at first, and when all goes well, you can reset to the initial value on the fly.

regards,
olivier
olivierG is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem of heat balance in Coal Boiler simulation DG FLUENT 9 December 25, 2008 21:57
Heat balance problem heam FLUENT 0 February 20, 2008 13:52
Heat balance in radiation simulation Rivera Phoenics 1 January 6, 2006 18:51
Is my mass flow considered as balance? MT Main CFD Forum 2 October 25, 2005 14:44
Heat and mass balance problem Laurent FLUENT 2 October 15, 2002 11:52


All times are GMT -4. The time now is 12:26.