CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   modified chtMultiRegionFOAM: how to exchange the pressure field between two regions? (https://www.cfd-online.com/Forums/openfoam-programming-development/163718-modified-chtmultiregionfoam-how-exchange-pressure-field-between-two-regions.html)

rou December 4, 2015 11:44

modified chtMultiRegionFOAM: how to exchange the pressure field between two regions?
 
Dear FOAMers,

I modified chtMultiRegionFOAM solver but I have some difficulties : in my case the pressure is calculated in region 1 but in the interface between the two regions I need this pressure to be used in region 2 as data
can you help me how to use a result from region 1 as data for region 2

Thanks in advance.

wyldckat December 10, 2015 17:17

Greetings Arough,

I received the PM you sent me and I came looking for a thread you had on this topic.
This is an interesting issue, because if I remember correctly, both chtMultiRegionFoam and chtMultiRegionSimpleFoam do not calculate the pressure equations/fields within the solid regions.

I need to know the following details from your case:
  1. In what state is the material in each region? Are both solids, fluids or one is solid and the other is fluid?
  2. What are the boundary conditions that you are using on each side for the pressure fields at the interface boundary between the two regions?
  3. Can you provide a simple example case that I can work with to try and experiment some possibilities?
Best regards,
Bruno

Cyp December 10, 2015 23:23

Hi rou,

you may have a look to these posts:

http://www.cfd-online.com/Forums/ope...tml#post420495

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

The tutorial mentioned in these threads was very useful! It was for temperature, but the idea remains the same for pressure.

Cheers,
Cyprien

rou December 14, 2015 09:48

thank you for your replay

Cyprien I will check these posts

wyldckat December 28, 2015 11:31

Greetings to all!

@Rou: I hope you don't mind, I'll try to answer your private message here on this thread:
Quote:

Here the informations you asked for:
  • in the two regions, I have the same fluid but in region 1 it is in the gaseous state and in region 2 it is liquid: the phase change phenomenon is located at the interface between two regions.
  • I added the governing equations (continuity, momentum and energy equations) and the equation of state for region 1. In region 2, the conduction equation is used.
So the pressure is just calculated in region 1. At the interface, the temperature is assumed to be the saturation temperature corresponding to the interface pressure using Clausius-Clapeyron equation. So,we consider that the interface pressure is equal to the pressure calculated in region 1.
the problem is how to use this pressure in region 2 to calculate the corresponding saturation temperature.
If I understand the problem correctly, then the solution should be something like this:
  1. If the pressure on the gas side is either compressing or decompressing, then that means that this is the dominant pressure field. The "mapped" or similar boundary conditions can be used for defining this value, namely for mapping the pressure boundary condition from the region 1 to the region 2.
  2. Quote:

    the problem is how to use this pressure in region 2 to calculate the corresponding saturation temperature.
    This feels like the thought process is flawed...then again, perhaps you're trying to calculate only the saturation temperature and not the temperature of the liquid at the interface. If this is the case, then this really depends on what you want to do with this temperature. Because:
    1. If this saturation temperature is to enter another calculation, then perhaps it's easiest to integrate this directly into the boundary condition that will need this value. There are a few boundary conditions in OpenFOAM that demonstrate this.
    2. If the saturation temperature is only for post-processing, then you can simply use a function object to sample the patch and output the pressure values. Then in post-processing, do the calculations.
The "mapped" boundary condition isn't directly exemplified in OpenFOAM's tutorials. There are a few tutorials that use the derived boundary conditions from this one and I still haven't fully figured out how this BC works. If you can provide a simple example case that I can work with, it will be easier for me to figure this out.

Best regards,
Bruno


All times are GMT -4. The time now is 21:17.