CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to check Heat Balance in heat transfer like mass balance for flow (http://www.cfd-online.com/Forums/openfoam-post-processing/61345-how-check-heat-balance-heat-transfer-like-mass-balance-flow.html)

mahendra November 13, 2008 08:37

Dear Foamers hello ! Is the
 
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.

mahendra November 21, 2008 04:50

Hello People ! No replies f
 
Hello People !

No replies for the above post???

Regards,
Mahendra

mahendra November 28, 2008 01:21

hi, At least a comment on t
 
hi,

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

Mahendra.

kati December 3, 2008 05:53

Hi Mahendra, There is a uti
 
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 December 3, 2008 06:13

I forgot to mention the utilit
 
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

mahendra December 4, 2008 02:05

Dear Kati, I really appreci
 
Dear Kati,

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

Thanks,
Mahendra.

mahaputra April 25, 2009 08:57

Quote:

Originally Posted by kati (Post 191509)
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

gschaider May 4, 2009 04:47

Quote:

Originally Posted by mahaputra (Post 214152)
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

Linh.Hoang July 28, 2009 03:56

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

gschaider July 28, 2009 08:38

Quote:

Originally Posted by Linh.Hoang (Post 224351)
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

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

Linh.Hoang July 28, 2009 08:59

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

gschaider July 28, 2009 13:03

Quote:

Originally Posted by Linh.Hoang (Post 224398)
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

schalinski February 8, 2012 06:28

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::printStack(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::pureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam::perfectGas> > > > >::calculate() in "/opt/openfoam201/platforms/linux64GccDPOpt/lib/libbasicThermophysicalModels.so"
#4 Foam::hPsiThermo<Foam::pureMixture<Foam::sutherlan dTransport<Foam::specieThermo<Foam::hConstThermo<F oam::perfectGas> > > > >::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!!

olivierG February 8, 2012 09:02

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

schalinski February 8, 2012 10:58

Quote:

Originally Posted by olivierG (Post 343347)
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

olivierG February 8, 2012 11:19

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


All times are GMT -4. The time now is 11:34.