CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   mapFields between two differents solvers (http://www.cfd-online.com/Forums/openfoam-pre-processing/119117-mapfields-between-two-differents-solvers.html)

Yunilo June 10, 2013 09:15

mapFields between two differents solvers
 
Hello everyone

First of all, thanks for all the help your forum already provided me on my numerous researches, but I did not found answer on this particular case so I have to ask you.

I used a steady solver (simpleFoam) on a complex geometry and it gave me values at the outlet of this geometry.

After this outlet, the fluid enter in a chamber full of gaz. So now I have the outlet values from simpleFoam and I want to have the behavior of the fluid in the chamber with a transient multiphase solver (interFoam).

I want to use mapFields in order to copy the values of speed and pressure from the outlet of the first geometry to the inlet of the new one.

But I have two problems :
  1. simpleFoam work with a p/rho pressure and I have a total pressure in interFoam, how to manage that ?
  2. simpleFoam give me a steady values (after an certain number of iterations), but mapFields will search values from source field directory on each time steps calculated, how can I fix a steady field at the inlet ?
Thanks by advance for your answers and sorry for my english mistakes.

wyldckat June 10, 2013 14:05

Greetings Lorris,

mapFields won't help you on this one. They are two completely different meshes.
The closest I know of that can help you is to use the method on the tutorial "incompressible/simpleFoam/pitzDailyExptInlet". Study the boundary conditions in "0" and the folder "constant/boundaryData" and you'll see that it maps out completely the values that enter in the inlet.

In theory, you'll have to sample the data from the first case, by using the points from the second case, for the same connecting patch. This can be done either with sample or ParaView.


The other possibility is to use swak4Foam... but I can't remember if this can be done with funkySetFields or if it's doable directly with groovyBC...

Best regards,
Bruno

Yunilo June 11, 2013 07:21

Thank you very much for your answer !

I succeded in the extraction of fields from my first geometry with sample however I'm not sure to perfectly understand the timeVaryingMappedFixedValue BC from the pitzDailyExptInlet case, especially the offset value. Is that one way to match the coordinate of the first geometry to the second one ?

Thanks for your clear help.

wyldckat June 16, 2013 11:51

Hi Lorris,

What I meant was the following:
  1. In ParaView:
    1. Load only the patch on the second case, instead of the whole internal mesh.
    2. Then "File -> Save Data" and save the points to CSV.
  2. For OpenFOAM, use the points from the CSV for sampling with a probe that uses a cloud of points.
  3. Then use the resulting cloud of values to initialize them in "constant/boundaryData".
    • The complication here is that the cloud of points is defined here "constant/boundaryData/inlet/points";
    • And the respective values are defined at "constant/boundaryData/inlet/0/*" for the respective points.
This does seem a bit complicated to do, but after the first successful attempt, it becomes easier ;)

Nonetheless, you might want to have a good long read at the following thread: http://www.cfd-online.com/Forums/ope...g-utility.html - it discusses something similar to what you want to do.

Best regards,
Bruno


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