Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

COMSOL incapable to calculate static pressure in a confined fluid?

Please login with a confirmed email address before reporting spam

COMSOL incapable to calculate static pressure in confined a fluid volume and its interaction with the confining container walls both resulting from differing thermal expansions ?

I'm a bit surprised, that my questions remain unsolved, as were questions from another user with the same intention years ago.

www.comsol.com/community/forums/general/thread/10927/
www.comsol.de/community/forums/general/thread/41815/
www.comsol.de/community/forums/general/thread/41767/


14 Replies Last Post 06.03.2017, 20:40 GMT-5
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.01.2014, 09:15 GMT-5
Hello Hans,

Have you seen the hyperelastic seal model in the Model Gallery? It incorporates the interaction between a gas and a close body that gas is trapped in.
www.comsol.com/model/hyperelastic-seal-206
That model does not include thermal expansion of the gas (there is no temperature difference in that model), but I would think you can incorporate that via the perfect gas law for instance.
Just my two cents.
Jeff
Hello Hans, Have you seen the hyperelastic seal model in the Model Gallery? It incorporates the interaction between a gas and a close body that gas is trapped in. http://www.comsol.com/model/hyperelastic-seal-206 That model does not include thermal expansion of the gas (there is no temperature difference in that model), but I would think you can incorporate that via the perfect gas law for instance. Just my two cents. Jeff

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28.01.2014, 09:33 GMT-5
Also, if your fluid is a gas COMSOL can handle thermal expansion through the dependence of density on temperature and pressure (for example the ideal gas law as Jeff described). I tried it in a couple of cases and it works, including cases with a confined fluid space. In that case, the pressure increases as expected when the temperature increases. You should select the slightly compressible fluid formulation and make sure you the fluid properties section uses the correct temperature and absolute pressure fields.

Nagi Elabbasi
Veryst Engineering
Also, if your fluid is a gas COMSOL can handle thermal expansion through the dependence of density on temperature and pressure (for example the ideal gas law as Jeff described). I tried it in a couple of cases and it works, including cases with a confined fluid space. In that case, the pressure increases as expected when the temperature increases. You should select the slightly compressible fluid formulation and make sure you the fluid properties section uses the correct temperature and absolute pressure fields. Nagi Elabbasi Veryst Engineering

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.01.2014, 12:52 GMT-5
Jeff, Thank You for the suggestion.
Jeff, Thank You for the suggestion.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.01.2014, 12:58 GMT-5
Thank You, Nagi!
Which physics nodes in which modules should I use ?
Thank You, Nagi! Which physics nodes in which modules should I use ?

Nagi Elabbasi Facebook Reality Labs

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 31.01.2014, 13:50 GMT-5
You're welcome!

Definitely the CFD Module has this functionality, but it is probably also available in the base package. You select the compressible flow formulation from the Physical Model settings of the fluid flow physics node. It’s called “Compressible Flow (Ma<0.3)” and you set the temperature and pressure fields from the Model Input settings of the Fluid Properties node.

Nagi Elabbasi
Veryst Engineering
You're welcome! Definitely the CFD Module has this functionality, but it is probably also available in the base package. You select the compressible flow formulation from the Physical Model settings of the fluid flow physics node. It’s called “Compressible Flow (Ma

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.02.2014, 11:45 GMT-5
Hi,

You can find additional information on how to compute the pressure in a cavity in the following blog post:

www.comsol.se/blogs/computing-controlling-volume-cavity/

Regards,
Henrik
Hi, You can find additional information on how to compute the pressure in a cavity in the following blog post: http://www.comsol.se/blogs/computing-controlling-volume-cavity/ Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 03.02.2014, 13:21 GMT-5
Thank You, Henrik

A question regarding, the calculation of the inner volume: Why is it only the x-component (-x*solid.nx) in AreaInt(-x*solid.nx) that we treat under the integral?

And a completely independend question:
Why can't I simply treat the fluid in the node of Solid Mechanics for pressure calculation, defining the Poisson ratio of water as 0.5 and the Young modulus as 2.08e9?
Thank You, Henrik A question regarding, the calculation of the inner volume: Why is it only the x-component (-x*solid.nx) in AreaInt(-x*solid.nx) that we treat under the integral? And a completely independend question: Why can't I simply treat the fluid in the node of Solid Mechanics for pressure calculation, defining the Poisson ratio of water as 0.5 and the Young modulus as 2.08e9?

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.02.2014, 02:44 GMT-5


A question regarding, the calculation of the inner volume: Why is it only the x-component (-x*solid.nx) in AreaInt(-x*solid.nx) that we treat under the integral?



That is an arbitrary choice. You could use -y*solid.ny or any linear combination of the two. Any function that fulfills the divergence theorem so that '1' would be computed by the corresponding volume integral will do.



And a completely independend question:
Why can't I simply treat the fluid in the node of Solid Mechanics for pressure calculation, defining the Poisson ratio of water as 0.5 and the Young modulus as 2.08e9?



In principle you could do that, but it has some problems:

1. You get a larger problem since you have to mesh also the cavity.
2. Since (1-2*nu) appears in the denominator in the constitutive relation for linear elasticity, you have to take special measures when Poisson's ratio approaches 0.5. You could use nu=0.499, and combine it with a 'mixed formulation' where the pressure is added as an extra degree of freedom. Still, such a solution will not be as accurate as the one outlined in the blog post.

Regards,
Henrik

[QUOTE] A question regarding, the calculation of the inner volume: Why is it only the x-component (-x*solid.nx) in AreaInt(-x*solid.nx) that we treat under the integral? [/QUOTE] That is an arbitrary choice. You could use -y*solid.ny or any linear combination of the two. Any function that fulfills the divergence theorem so that '1' would be computed by the corresponding volume integral will do. [QUOTE] And a completely independend question: Why can't I simply treat the fluid in the node of Solid Mechanics for pressure calculation, defining the Poisson ratio of water as 0.5 and the Young modulus as 2.08e9? [/QUOTE] In principle you could do that, but it has some problems: 1. You get a larger problem since you have to mesh also the cavity. 2. Since (1-2*nu) appears in the denominator in the constitutive relation for linear elasticity, you have to take special measures when Poisson's ratio approaches 0.5. You could use nu=0.499, and combine it with a 'mixed formulation' where the pressure is added as an extra degree of freedom. Still, such a solution will not be as accurate as the one outlined in the blog post. Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.02.2014, 12:32 GMT-5
Thank You!

==> How will the formula for an inner area "AreaInt(-x*solid.nx)" look like if it is written for a volume in 3D? Identically?
==> I try to see if EnclosedArea varies with variabel external pressure or with different Young modulus, but it doesn't change, so it doesn't seem to represent the deformed volume?
==> And how do I refer to the Young modulus, defined as E in the material properties? "E" is an "unknown variable" if I try to use it in the definitions in a formula like: "0.1[MPa]*((0.028274[mm^3]/EnclosedVolume)*E)". What is the variables name to be used in the Definitions?

==> Yes, You are right. If I include the water into the Solid Mechanics model, I get an extremely heterogeneous pressure field in the water volume, what for shure is far from the reality. But I don't really understand, why there is no simple option to calculate this, resp. why the treatment as one system with water included in the FE modeling is no possible way.


==>The variability of this inner pressure within the water volume is what I need to calculate
depending on the reaction to a variable external temperature field acting on the containers extenal hull transfered to its water contents.

As regards the water inclusion, I think it is not constant volume.
The size of the metal container changes depending on:
- its internal temperature distribution (thermal expansion)
- variable external pressure acting on it
- variable internal pressure from the included fluid (thermal expansion)

The volume of the included water changes depending on
- the containers cavity size (external pressure)
- the internal temperature distribution in the water (thermal expansion)

Heat transfer through a mixed arrangement of solids and fluids and resulting expansions in fluid and solids define the pressure in the water included inside.

Thank You! ==> How will the formula for an inner area "AreaInt(-x*solid.nx)" look like if it is written for a volume in 3D? Identically? ==> I try to see if EnclosedArea varies with variabel external pressure or with different Young modulus, but it doesn't change, so it doesn't seem to represent the deformed volume? ==> And how do I refer to the Young modulus, defined as E in the material properties? "E" is an "unknown variable" if I try to use it in the definitions in a formula like: "0.1[MPa]*((0.028274[mm^3]/EnclosedVolume)*E)". What is the variables name to be used in the Definitions? ==> Yes, You are right. If I include the water into the Solid Mechanics model, I get an extremely heterogeneous pressure field in the water volume, what for shure is far from the reality. But I don't really understand, why there is no simple option to calculate this, resp. why the treatment as one system with water included in the FE modeling is no possible way. ==>The variability of this inner pressure within the water volume is what I need to calculate depending on the reaction to a variable external temperature field acting on the containers extenal hull transfered to its water contents. As regards the water inclusion, I think it is not constant volume. The size of the metal container changes depending on: - its internal temperature distribution (thermal expansion) - variable external pressure acting on it - variable internal pressure from the included fluid (thermal expansion) The volume of the included water changes depending on - the containers cavity size (external pressure) - the internal temperature distribution in the water (thermal expansion) Heat transfer through a mixed arrangement of solids and fluids and resulting expansions in fluid and solids define the pressure in the water included inside.

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.02.2014, 11:41 GMT-5


==> How will the formula for an inner area "AreaInt(-x*solid.nx)" look like if it is written for a volume in 3D? Identically?



Yes, identically.


==> I try to see if EnclosedArea varies with variabel external pressure or with different Young modulus, but it doesn't change, so it doesn't seem to represent the deformed volume?



It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change.



==> And how do I refer to the Young modulus, defined as E in the material properties? "E" is an "unknown variable" if I try to use it in the definitions in a formula like: "0.1[MPa]*((0.028274[mm^3]/EnclosedVolume)*E)". What is the variables name to be used in the Definitions?



solid.E (assuming that the tag of the solid mechanics interface is 'solid')



==> Yes, You are right. If I include the water into the Solid Mechanics model, I get an extremely heterogeneous pressure field in the water volume, what for shure is far from the reality. But I don't really understand, why there is no simple option to calculate this, resp. why the treatment as one system with water included in the FE modeling is no possible way.



If you really want to model the fluid, you will need some suitable equation for hydrostatics. A fluid does not give a well-posed problem for solid mechanics.



==>The variability of this inner pressure within the water volume is what I need to calculate
depending on the reaction to a variable external temperature field acting on the containers extenal hull transfered to its water contents.

As regards the water inclusion, I think it is not constant volume.
The size of the metal container changes depending on:
- its internal temperature distribution (thermal expansion)
- variable external pressure acting on it
- variable internal pressure from the included fluid (thermal expansion)

The volume of the included water changes depending on
- the containers cavity size (external pressure)
- the internal temperature distribution in the water (thermal expansion)

Heat transfer through a mixed arrangement of solids and fluids and resulting expansions in fluid and solids define the pressure in the water included inside.


The important question here is whether you need to compute the temperature distribution in the water or not.

There are three scenarios:

1. The temperature is constant in the fluid. You can use a variant of the last example in the blog post. In the Global equations you will then write something like EnclosedVolume - InitialVolume*(1+alpha*Temp)*(1-Pressure/BulkModulus). There are two independent contributions: A volume change due to thermal expansion, and volume change due to compressibility.

2. The fluid is completely at rest, but has a non-uniform temperature distribution. It is then sufficient to solve a heat conduction problem in the cavity. The total volume change due to thermal expansion can be computed as an integral of alpha*Temp, but apart from that you can proceed as in case 1. The expression in the Global equation would change to EnclosedVolume - (InitialVolume + my_integrated_expansion)*(1-Pressure/BulkModulus)

3. The problem is transient. You will probably need to combine CFD with heat transfer in the cavity to incorporate buoyancy and convection effects. This is then a full FSI problem where the pressure in the fluid is fed as a load to the structure, and the mesh (and thus the volume) in the cavity is controlled by structural deformation.

Regards,
Henrik


[QUOTE] ==> How will the formula for an inner area "AreaInt(-x*solid.nx)" look like if it is written for a volume in 3D? Identically? [/QUOTE] Yes, identically. [QUOTE] ==> I try to see if EnclosedArea varies with variabel external pressure or with different Young modulus, but it doesn't change, so it doesn't seem to represent the deformed volume? [/QUOTE] It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change. [QUOTE] ==> And how do I refer to the Young modulus, defined as E in the material properties? "E" is an "unknown variable" if I try to use it in the definitions in a formula like: "0.1[MPa]*((0.028274[mm^3]/EnclosedVolume)*E)". What is the variables name to be used in the Definitions? [/QUOTE] solid.E (assuming that the tag of the solid mechanics interface is 'solid') [QUOTE] ==> Yes, You are right. If I include the water into the Solid Mechanics model, I get an extremely heterogeneous pressure field in the water volume, what for shure is far from the reality. But I don't really understand, why there is no simple option to calculate this, resp. why the treatment as one system with water included in the FE modeling is no possible way. [/QUOTE] If you really want to model the fluid, you will need some suitable equation for hydrostatics. A fluid does not give a well-posed problem for solid mechanics. [QUOTE] ==>The variability of this inner pressure within the water volume is what I need to calculate depending on the reaction to a variable external temperature field acting on the containers extenal hull transfered to its water contents. As regards the water inclusion, I think it is not constant volume. The size of the metal container changes depending on: - its internal temperature distribution (thermal expansion) - variable external pressure acting on it - variable internal pressure from the included fluid (thermal expansion) The volume of the included water changes depending on - the containers cavity size (external pressure) - the internal temperature distribution in the water (thermal expansion) Heat transfer through a mixed arrangement of solids and fluids and resulting expansions in fluid and solids define the pressure in the water included inside. [/QUOTE] The important question here is whether you need to compute the temperature distribution in the water or not. There are three scenarios: 1. The temperature is constant in the fluid. You can use a variant of the last example in the blog post. In the Global equations you will then write something like EnclosedVolume - InitialVolume*(1+alpha*Temp)*(1-Pressure/BulkModulus). There are two independent contributions: A volume change due to thermal expansion, and volume change due to compressibility. 2. The fluid is completely at rest, but has a non-uniform temperature distribution. It is then sufficient to solve a heat conduction problem in the cavity. The total volume change due to thermal expansion can be computed as an integral of alpha*Temp, but apart from that you can proceed as in case 1. The expression in the Global equation would change to EnclosedVolume - (InitialVolume + my_integrated_expansion)*(1-Pressure/BulkModulus) 3. The problem is transient. You will probably need to combine CFD with heat transfer in the cavity to incorporate buoyancy and convection effects. This is then a full FSI problem where the pressure in the fluid is fed as a load to the structure, and the mesh (and thus the volume) in the cavity is controlled by structural deformation. Regards, Henrik

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.02.2014, 16:42 GMT-5
>>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change."<<

In my trial, I did not define the volume constant, but just calculated it from the formula for the volume "AreaInt(-x*solid.nx)". Then in the results node I checked the volume with different external pressures, but the volume remained the start volume.

>>If you really want to model the fluid, you will need some suitable equation for hydrostatics.<<
Is there a given way to do so with COMSOL?

>>The important question here is whether you need to compute the temperature distribution in the water or not.<<
It is szenario 3) I have temperatures acting on the surface of the container. They change in location and time. The amplitude of the variation is small in the range below 1K. The heat from this is transfered through the body of the container and continues into the water. Both container and water have inhomogenous temperature fields changing in time. The resulting internal pressure has to be calculated with very high precision.
>>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change.">If you really want to model the fluid, you will need some suitable equation for hydrostatics.>The important question here is whether you need to compute the temperature distribution in the water or not.

Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 12.02.2014, 12:34 GMT-5

>>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change."<<

In my trial, I did not define the volume constant, but just calculated it from the formula for the volume "AreaInt(-x*solid.nx)". Then in the results node I checked the volume with different external pressures, but the volume remained the start volume.


Did you have geometric nonlinarity activated in the study? If not, the coordinates x and the normals solid.nx are not updated to reflect the deformed state.


>>If you really want to model the fluid, you will need some suitable equation for hydrostatics.<<
Is there a given way to do so with COMSOL?


If you need the hydrostatic pressure gradient, you can include that in the boundary load. The pressure in the fluid will be p = Pressure - g_const*rho_fluid*(z-z0). 'Pressure' is still the extra variable to be determined by the constant volume condition.

You could also mesh the cavity, and add an extra PDE interface there.

>>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change."<<

In my trial, I did not define the volume constant, but just calculated it from the formula for the volume "AreaInt(-x*solid.nx)". Then in the results node I checked the volume with different external pressures, but the volume remained the start volume.

>>If you really want to model the fluid, you will need some suitable equation for hydrostatics.<<
Is there a given way to do so with COMSOL?

>>The important question here is whether you need to compute the temperature distribution in the water or not.<<
It is szenario 3) I have temperatures acting on the surface of the container. They change in location and time. The amplitude of the variation is small in the range below 1K. The heat from this is transfered through the body of the container and continues into the water. Both container and water have inhomogenous temperature fields changing in time. The resulting internal pressure has to be calculated with very high precision.


Since the internal temperature distribution in the fluid must be solved, there is no way around adding a physics interface for cavity too, but do you have to solve for the flow, or could it still be sufficent with temperature + pressure?

Regards,
Henrik

[QUOTE] >>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change.">If you really want to model the fluid, you will need some suitable equation for hydrostatics.>It depends on the model for the fluid. In the last case in the blog post, there is an assumption about incompressibility of the fluid, so it does not change. For the gas case, it does change.">If you really want to model the fluid, you will need some suitable equation for hydrostatics.>The important question here is whether you need to compute the temperature distribution in the water or not.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 18.02.2014, 15:09 GMT-5

Since the internal temperature distribution in the fluid must be solved, there is no way around adding a physics interface for cavity too, but do you have to solve for the flow, or could it still be sufficent with temperature + pressure?


The only flow occuring is that of the convection from changing surface temperatures of the metal container, transfered to the fluid.

[QUOTE] Since the internal temperature distribution in the fluid must be solved, there is no way around adding a physics interface for cavity too, but do you have to solve for the flow, or could it still be sufficent with temperature + pressure? [/QUOTE] The only flow occuring is that of the convection from changing surface temperatures of the metal container, transfered to the fluid.

Please login with a confirmed email address before reporting spam

Posted: 7 years ago 06.03.2017, 20:40 GMT-5
Dear Henrik Sönnerlind,

Thank you for your attention. Now I would like to simulate a gas compression process as a part of my model. As this part is not the main body of my model, I want to simulate this process by the ideal gas law. Although other models can achieve such a process, they may reduce the calculation efficiency of total model. The gas compression process occurs in a container which allows gas flow out according to a certain law. It means that the container is not closed, and I also need the "Outlet" node to let the gas flow out. Could you please give me some suggestions to simulate such a process?

I really appreciate your help and time.

Regards,
Yu
Dear Henrik Sönnerlind, Thank you for your attention. Now I would like to simulate a gas compression process as a part of my model. As this part is not the main body of my model, I want to simulate this process by the ideal gas law. Although other models can achieve such a process, they may reduce the calculation efficiency of total model. The gas compression process occurs in a container which allows gas flow out according to a certain law. It means that the container is not closed, and I also need the "Outlet" node to let the gas flow out. Could you please give me some suggestions to simulate such a process? I really appreciate your help and time. Regards, Yu

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.