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

How to add temperature to cavitatingFoam solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 2, 2010, 03:28
Default How to add temperature to cavitatingFoam solver
  #1
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 7
chodki-c is on a distinguished road
Hi everyone,

I'm trying to solve a case which conjugates both multiphase flow and thermal wall. As I haven't found an appropriate solver I want to modify the cavitatingFoam solver. I just want to add an equation for temperature but I don't know how can I proceed.
The "HowTo add temperature to icoFoam" tutorial of Wiki cannot help me.

As anyone try to do the same thing and can help me!!

Have a good day
chodki-c is offline   Reply With Quote

Old   August 3, 2010, 03:25
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi,

can you explain, why this tutorial is'nt of any help?
Did you try the steps. In what step did you get problems?

Best Kathrin
kathrin_kissling is offline   Reply With Quote

Old   August 3, 2010, 03:39
Default
  #3
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 7
chodki-c is on a distinguished road
Hi Kathrin,

Thanks for your response.
The tutorial is made for the solver icoFoam.
I tought it was easy to do the same things with cavitatingFoam so I have followed all the steps without any changes.
However when I try to run the case "throttle" (which is the case example of cavitatingFoam) I meet some problems of dimensions:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.0 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.0-279cc8e8233b
Exec : thermalCavitatingFoam
Date : Aug 03 2010
Time : 09:35:57
Host : goth
PID : 4479
Case : /home/areelis/Bureau/Cynthia/tutorials/multiphase/thermalCavitatingFoam/throttle
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermodynamicProperties

Reading field p

Creating compressibilityModel

Selecting compressibility model linear
Reading field U

Reading field T

Reading/calculating face flux field phiv

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
expected a [ in dimensionSet
in stream ITstream : /home/areelis/Bureau/Cynthia/tutorials/multiphase/thermalCavitatingFoam/throttle/constant/transportProperties:T, line 22, IOstream: Version 2.0, format ASCII, line 22, OPENED, GOOD

Selecting turbulence model type RASModel
Selecting RAS turbulence model kOmegaSST
kOmegaSSTCoeffs
{
alphaK1 0.85034;
alphaK2 1;
alphaOmega1 0.5;
alphaOmega2 0.85616;
gamma1 0.5532;
gamma2 0.4403;
beta1 0.075;
beta2 0.0828;
betaStar 0.09;
a1 0.31;
c1 10;
}

Courant Number mean: 0 max: 0
phiv Courant Number mean: 0 max: 0 acoustic max: 0.288861

Starting time loop

phiv Courant Number mean: 0 max: 0 acoustic max: 0.288861
deltaT = 1.1999e-08
Time = 1.1999e-08

DILUPBiCG: Solving for rho, Initial residual = 0.613556, Final residual = 0, No Iterations 1
max-min rho: 844.998 834.998
max-min gamma: 0 0
DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 6.34307e-16, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 6.50228e-16, No Iterations 2
max(U) 2.83958
GAMG: Solving for p, Initial residual = 1, Final residual = 3.69146e-06, No Iterations 1
GAMG: Solving for p, Initial residual = 9.54005e-07, Final residual = 2.36346e-10, No Iterations 1
Predicted p max-min : 3e+07 1e+07
max-min gamma: 0 0
Phase-change corrected p max-min : 3e+07 1e+07
max(U) 2.80134
GAMG: Solving for p, Initial residual = 0.00996903, Final residual = 3.67993e-08, No Iterations 1
GAMG: Solving for p, Initial residual = 3.57757e-08, Final residual = 9.03801e-12, No Iterations 1
Predicted p max-min : 3e+07 1e+07
max-min gamma: 0 0
Phase-change corrected p max-min : 3e+07 1e+07
max(U) 2.79985
DILUPBiCG: Solving for omega, Initial residual = 5.23551e-05, Final residual = 1.62015e-12, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 2.81372e-15, No Iterations 2
bounding k, min: 3.31924e-35 max: 9.99977 average: 9.99835


--> FOAM FATAL ERROR:
incompatible dimensions for operation
[T[0 0 -1 1 0 0 0] ] + [T[1 -3 -1 1 0 0 0] ]

From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
in file /opt/openfoam170/src/finiteVolume/lnInclude/fvMatrix.C at line 1194.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam170/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*) in "/opt/openfoam170/applications/bin/linuxGccDPOpt/thermalCavitatingFoam"
#3 Foam::tmp<Foam::fvMatrix<double> > Foam:perator+<double>(Foam::tmp<Foam::fvMatrix<d ouble> > const&, Foam::tmp<Foam::fvMatrix<double> > const&) in "/opt/openfoam170/applications/bin/linuxGccDPOpt/thermalCavitatingFoam"
#4
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/thermalCavitatingFoam"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6
in "/opt/openfoam170/applications/bin/linuxGccDPOpt/thermalCavitatingFoam"
Abandon


So I think it's because the equation for the temperature is not the same for a multiphase flow.
Can you try to help me?
Thanks a lot in advance.

Bests. Cynthia.
chodki-c is offline   Reply With Quote

Old   August 3, 2010, 03:47
Default
  #4
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Maybe it is something very simple

start with the first error output

expected a [ in dimensionSet
in stream ITstream : /home/areelis/Bureau/Cynthia/tutorials/multiphase/thermalCavitatingFoam/throttle/constant/transportProperties:T, line 22, IOstream: Version 2.0, format ASCII, line 22, OPENED, GOOD

There seems to be something wrong in your transportProperties file. Some [ is missing. Could you start with checking that? Or post your transportProperties file. If this is correct we can take the next step if necessary!

Best
Kathrin
kathrin_kissling is offline   Reply With Quote

Old   August 3, 2010, 04:21
Default
  #5
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 7
chodki-c is on a distinguished road
Thanks,

I didn't see that mistake.
I have added the "[" but there is the same problem of dimension.

I have verified the dimensions of DT and T, but I think there is no problem here.
DT [ 0 2 -1 0 0 0 0]
T [0 0 0 1 0 0 0]
chodki-c is offline   Reply With Quote

Old   August 3, 2010, 04:37
Default
  #6
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Ok,

could you post your implementation of the TEqn?

Maybe it is something there.
kathrin_kissling is offline   Reply With Quote

Old   August 3, 2010, 04:48
Default
  #7
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 7
chodki-c is on a distinguished road
Of course.
Please find enclosed the implementation of T and the case "throttle" with T.
Thanks a lot for your help again.

Cynthia
Attached Files
File Type: gz thermalCavitatingFoam.tar.gz (1.9 KB, 40 views)
File Type: gz 0.tar.gz (1.1 KB, 27 views)
File Type: gz constant.tar.gz (945 Bytes, 21 views)
File Type: gz system.tar.gz (1.5 KB, 23 views)
chodki-c is offline   Reply With Quote

Old   August 3, 2010, 05:33
Default
  #8
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
ok Cynthia,

in your TEqn:

Do

fvm::ddt(rho, T) +fvm::div(phi, T)

and in a first step skip the molecular transport. You need the rho, since you are not using the incompressible icoFoam, where the equations are devided by rho. Check with your dimension error and you will get the point.

This should work! I tried it myself just a minute ago.

Than you can start to add the next term.

If you have more questions feel free!

Best

Kathrin
kathrin_kissling is offline   Reply With Quote

Old   August 3, 2010, 05:51
Default
  #9
New Member
 
Join Date: Jul 2010
Posts: 11
Rep Power: 7
chodki-c is on a distinguished road
Thanks a lot!!!

It works well with your hints. I totally forgot that cavitatingFoam is a compressible solver and not icoFoam...

However when I introduce the laplacian term, I have the same problem of dimensions.
Can you explain to me this term. I'm quite new in OF and I'm not sure to understand it.

Bests.
Cynthia
chodki-c is offline   Reply With Quote

Old   September 30, 2010, 11:21
Default
  #10
jml
New Member
 
Jml
Join Date: Mar 2009
Posts: 23
Rep Power: 8
jml is on a distinguished road
hello everyone,
I have tried to add the temperature equation to cavitatingFoam as explained in the tutorial of wiki, but unfortunately I have the same problems of dimensions with the laplacian term.

-----------------
incompatible dimensions for operation
[T[1 -3 -1 1 0 0 0] ] + [T[0 0 -1 1 0 0 0] ]#0 Foam::error:rintStack(Foam::Ostream&)
---------------------


Could you help me with the implementation? What can I do to solve it?

Thanks.
jml is offline   Reply With Quote

Reply

Tags
cavitatingfoam, howto add t, temperature

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add temperature to compressibleInterFoam hsieh OpenFOAM Running, Solving & CFD 2 July 24, 2011 17:11
patching problem unsteady solver yellow-stuff Main CFD Forum 0 September 25, 2009 01:26
Which solver for temperature fred OpenFOAM Running, Solving & CFD 7 December 5, 2006 10:56
Add user define monitor in CFX Solver Zaidun CFX 0 April 17, 2006 14:57
Convergence with coupled implicit solver Henrik Ström FLUENT 1 October 29, 2005 03:57


All times are GMT -4. The time now is 20:39.