CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   thermophysicalProperties for a liquid for chtMultiRegionFoam (http://www.cfd-online.com/Forums/openfoam-solving/82056-thermophysicalproperties-liquid-chtmultiregionfoam.html)

sebonator November 15, 2010 08:59

thermophysicalProperties for a liquid for chtMultiRegionFoam
 
Hi,

I want to use the chtMultiRegionFoam-Solver to calculate the heat transport in a pump. As the pumped media is water and the properties should be temperature-dependent, I have to adapt the thermophysicalProperties to water.

I studied the chapter on thermophysical Models in the user-guide and the multiRegionHeater-tutorial to understand the usage of this solver and I am able to simulate heat transport with air. Unfortunately, I am not able to adapt the options for thermophysical Models described in the user-guide to my case with water, because the chtMultiRegionFoam-solver seems to support only the heat transport with gases. At least, the error message that appears when starting the solver makes me believe this:

--> FOAM FATAL ERROR:
Unknown basicPsiThermo type hRhoThermo<pureMixture<polynomialtransport<specieT hermo<hPolynomialThermo<icoPolynimial>>>>>

The list of valid basicPsiThermo types that follows this error only consists of types which use the <perfectGas> equation of state, which is absolutely not suited for calculating water, isn't ist?!?!?!

My questions now are:
1)Is it in general possible to calculate the heat transport in water with the chtMultiRegionSolver?

2)If yes, what is necessary to make the thermophysical model I want to use (see the error-message above) work with this solver? If anything in the solver itself has to be changed and recompiled, please describe that in detail, because I am not that familiar with the file structure, the libraries and classes of OpenFOAM.

Thanks for every answer!
Sebastian

Chris Lucas November 15, 2010 13:20

Hi,

as I understand your case, you want to simulate a compressible water flow. So why do you need a Multi Region Solver? Can't you simply use rhoPisoFOAM or rhoSimpleFOAM ?

About the thermophysical models you want to use, the combination is not defined in the template so you have to redefine it. Have a look that the file rhoThermos.C ( I guess). Otherwise, have a look through the forum; this question has been answers before (something about icoPolynimial).

Regards,
Christian

sebonator November 15, 2010 14:48

Hi Chris,

thanks for your Reply!

No, I want to simulate the water flow, the temperature changes in the water and the temperature changes in the solid parts surrounding the flow, so I think the chtMultiRegionFoam-Solver is exactly what I need.

I already searched the forum, but I will retry to search for icoPolynomial as you said. I will report it here, if I find anything interesting concerning the topic.

Can you explain a bit what you want to say with "the combination is not defined in the template so you have to redefine it"? As I said, I am absolutely not familiar with the classes used by OpenFoam, so I would appreciate if you could explain more detailed WHERE I have to redefine WHAT in order to use my combination of interest.

Thanks in advance!
Greetings Sebastian

Chris Lucas November 16, 2010 04:53

Hi,

have a look @ this. simply exchange hPsiThermo with hRhoThermo, which you are using

http://www.cfd-online.com/Forums/ope...roperties.html

Regards,
Christian

sebonator November 16, 2010 04:56

Hi there,

I only wanted to emphasize that I do not explicitly want to simulate the water flow as compressible! I thought the "icoPolynomial" equation of state chosen for the thermophysical model tells the solver to calculate an incompressible flow.

I am grateful for every answer!
Greetings Sebastian

Chris Lucas November 16, 2010 12:45

Hi,

have a look at this

http://www.cfd-online.com/Forums/ope...egionfoam.html

Regards,
Christian

sebonator November 16, 2010 17:37

Hi Chris,

I saw that modified solver, too, but later in the thread canesin sais that he neglected natural convection and as I also want to simulate the heat transfer in the not running pump, this solver doesn't suit me. But thanks for your reply again!

I spent the whole day again in reading the forum and going through the source code. I tried to add the combination of my thermophysical model to the hPsiThermos.C file as you advised in the first link, Chris. Then I recompiled the whole thermophysical source by using the Allwmake located in the thermophysicalModels directory. When I then tried to start the solver, the same error message as shown above appaered again.

The entries I added in hPsiThermos.C are:
makeBasicPsiThermo
(
hPsiThermo,
pureMixture,
polynomialTransport,
hPolynomialThermo,
icoPolynomial
)

After that, I tried to add the combination also in the basicMixtures.C file. I also included all the missing .H files for the parts of my model, because errors appeared when I tried to recompile without that. This was not necessary during my changes to the hPsiThermos.C file!

Unfortunately, the recompiling still does not work. The error deals with the icoPolynomial equation of state I want to use. The compiler says, that the equation of state function (don't know if that is the correct expression in an object-orientated program) expects two input arguments: the type, which I tell to be icoPolynomial, and the size of the polynomial that approximates the temperature dependency of the density. I then tried to add the size of the polynomial as a fifth argument to the makeBasicMixture function in basicMixtures.C, but that resultet in a compiling error which said, that there is no fifth argument allowed in makeBasicMixture!

The entries I added in basicMixtures.C are:
makeBasicMixture
(
pureMixture,
polynomialTransport,
hPolynomialThermo,
icoPolynomial
)

I don't know what I did wrong... Does anyone see my mistake? Or does at least anyone know where I have to define the size of the polynom?

Thanks for every answer!
Greetings Sebastian

juho November 16, 2010 18:36

Hi,

Couple of weeks ago the chtMultiRegionFoam in the 1.7.x version was updated to use hRhoThermo and the hRhoThermo was updated to allow the icoPolynomial equation of state and polynomial material properties. This has been mentioned in several threads here on the forum.

What you should do is install the latest 1.7.x version from the Git repository (check http://www.openfoam.com/download/git.php). It includes the modified solver and a tutorial with liquid and gas regions to get you started.


All times are GMT -4. The time now is 14:13.