Closed HishamSaeed closed 3 years ago
According to OpenFOAM, the fluid density has initially a uniform value of 1 kg/m^3
(and of course varies during the course of the simulation). AFAIU you are running the solid participant, right? Does a density value of 1 kg/m^3
work for you?
According to OpenFOAM, the fluid density has initially a uniform value of
1 kg/m^3
(and of course varies during the course of the simulation).
Then this information should also go into our documentation. I will open a PR on this.
Does a density value of
1 kg/m^3
work for you?
From my perspective the density should not be required for solving the heat equation in the solid, if you are only interested in heat flux and temperature. In this case thermal diffusivity and thermal conductivity should be sufficient. So our current specification for the solid is complete from this perspective.
However, as soon as you are interested in the actual energy you either need the specific heat capacity or the density. Additionally, we do not know what different solvers require. Even if the FEniCS-based heat solver works without density, other solvers may compute the energy (even if we don't need it) and therefore the density will be required.
My opinion here: If we also provide a density for the solid, we are on the safe side and can assume that with most solvers one will be able to set up the case.
What I would still like to know: What does Elmer require for heat conduction in a solid? What about OpenFOAM? Is there a default value? Is density not required at all? Any input would be appreciated.
Also in the solid i cannot calculate it because
alpha(thermal diffusivity)
is provided as well ask(Heat Conductivity
) but thecp(Heat Capacity)
is not provided which also is required by Elmer. Is there a way to access these data or calculate it.
From this I understand that:
@HishamSaeed Is this correct or am I misunderstanding something?
Also in the solid i cannot calculate it because
alpha(thermal diffusivity)
is provided as well ask(Heat Conductivity
) but thecp(Heat Capacity)
is not provided which also is required by Elmer. Is there a way to access these data or calculate it.From this I understand that:
- Elmer is the solid. It requires the specific heat capacity (cp) and therefore the user has to know density or specific heat capacity of the solid. This is currently not given in our documentation.
- OpenFOAM is the fluid. As described by David, OpenFOAM defaults to rho = 1 kg/m^3, but this is not documented for our tutorial case. So not clearly specified.
@HishamSaeed Is this correct or am I misunderstanding something?
In my case, yes Elmer is the solid for the flow over heated plate, and Elmer always requires the density and heat capacity for the heat equation, i am not sure why. check the heat equation model in Models manual http://www.nic.funet.fi/pub/sci/physics/elmer/doc/ElmerModelsManual.pdf.
Possibly because it operates on the governing equation of incompressible fluid.
According to OpenFOAM, the fluid density has initially a uniform value of
1 kg/m^3
(and of course varies during the course of the simulation). AFAIU you are running the solid participant, right? Does a density value of1 kg/m^3
work for you?
Yes, i am running the solid participant as Elmer, the density values for both the solid and fluid are 1kg/m^3. But i still have problems in the calculated velocity when both solvers are coupled.
But i still have problems in the calculated velocity when both solvers are coupled.
Could you explain this a bit more in detail?
According to OpenFOAM, the fluid density has initially a uniform value of
1 kg/m^3
(and of course varies during the course of the simulation). AFAIU you are running the solid participant, right? Does a density value of1 kg/m^3
work for you?
But this is not defined directly, right? If it was, it should be in the constant directory. I think in this model, density is derived from a state equation, based on the rest of the parameters.
A citation here would be helpful.
According to OpenFOAM, the fluid density has initially a uniform value of
1 kg/m^3
(and of course varies during the course of the simulation). AFAIU you are running the solid participant, right? Does a density value of1 kg/m^3
work for you?But this is not defined directly, right? If it was, it should be in the constant directory.
What about this part?
Maybe the density is "hidden" here. But I'm just guessing here and did not find a reference linking molar weight and nMoles
(what does this mean?) to density.
edit From the user guide:
specie containing i.e. number of moles, nMoles, of the specie, and molecular weight, molWeight in units of g/mol;
Exactly, one can use the molecular information in a state equation and compute e.g. the density. OpenFOAM does have state equations, here we set the p*V=nMoles*R*T
(perfect gas):
equationOfState perfectGas;
One can usually then compute the density as:
nMoles / V = p / (R T), rho = mass / V = nMoles * molWeight / V
I did a quick experiment with molWeight 24.0999
(bottom) vs. molWeight 24000.0999
(top) to find out whether it is actually a "don't care" or not:
There is a clearly visible difference.
Some more notes: I played around with the parameters a bit more:
nMoles * molWeight
constant does not give me the expected result. Using molWeight 24000.0999
and nMoles 0.001
gives a result similar (or identical?) to the one at the top.molWeight 24.0999
with nMoles = 0.001
gives a result similar (or identical?) to the bottom.From this I currently conclude that 1) nMoles
is actually not needed, I was able to remove this parameter and 2) molWeight
is the important parameter we have to look at.
I think I found the correct connection between the fluid density and the molar mass. I've written down everything in latex for nicer typesetting and will provide it here as a reference:
Thanks, should be resolved from now on.
For the future: a nice overview of all parameters is also given in Lucias thesis on page 53
Hi i am trying to couple openFOAM with Elmer FEM solver, i am using the flow over heated plate problem as a test problem. For this tutorial, i cannot find the density of the fluid as well as the solid which are required by Elmer solver, otherwise the solver stops and does not continue. I cannot calculate the fluid density from Prandtl number because the density cancels out in equation
$$Pr = \nu / \alpha $$ , $$Pr = (\mu / \rho) / (\cp * k / \rho) $$
. For more details about Prandtl number equation: https://en.wikipedia.org/wiki/Prandtl_numberAlso in the solid i cannot calculate it because
alpha(thermal diffusivity)
is provided as well ask(Heat Conductivity
) but thecp(Heat Capacity)
is not provided which also is required by Elmer. Is there a way to access these data or calculate it.Thanks in advance Hisham