CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   CFX: How to save variables of boundary domain of transient run and use it as input (

papanef November 9, 2010 12:44

CFX: How to save variables of boundary domain of transient run and use it as input
Dear all,
i would appreciate any help on the following:
i would like to split the scenario of a release and dispersion of a gas from a high pressure tank into 2 simulations: (a) simulation with a computational domain close to release with a very fine mesh to capture relevant phenomena and (b) simulation with a coarser grid for dispersion in the far field. Any ideas on how to connect these 2 simulations? Do you have a script (or give me a description to generate it myself) that i could use to save the variables at each time step of the outlet of simulation (a) and then use it as inflow conditions for simulation b) ? I am using CFX 12.0

ghorrocks November 9, 2010 17:44

This sounds like a straight-forward thing. Just use the interpolation function to interpolate the results of the first simulation onto the larger mesh for the second. With that initial condition continue the second simulation.

ghorrocks November 9, 2010 17:46

Or if you want to extract the flow rate versus time from sim 1 and use it as a boundary condition for sim 2 then that is easy too: Make a monitor point and set it to output the flow rate you want. Then export the data from solver manager, do a bit of text file manipulation and input it as a flow vs time interpolation function for the inflow boundary flow rate.

papanef November 10, 2010 04:56

Thank you very much for your fast reply.

papanef November 10, 2010 11:08

I would appreciate if you could give me some more help on the scenario i mentioned. First of all, a better description of the scenario:
it is a highly under-expanded gas jet resulting from a high pressure tank. Due to the emptying of the tank, the pressure is decreasing therefore the jet does not have constant properties thought the emptying. Simulation (a) should be a small computational domain starting from the jet exit and will capture the complex shock structures. The domain should cover the Mach disk and the outflow boundary should be far enough for the jet to have assumed atmospheric pressure. Simulation (b) should be done for the dispersion of the jet in the far field. The inflow boundary conditions for simulation (b) should be taken from simulation (a) at each time step. I expect to have air entrainment after the Mach disk therefore I would also like to be able to save for each time step the gas mass fraction. Following your instructions i cannot find the way to set up a variable (in time and in the 2D space) gas mass fraction for the inflow boundary of simulation (b).
I thought that by saving an output file of the outflow of simulation (a) with all the variables for each time step, and then using this file for the inflow of simulation (b) would be the best choice. Any suggestions?

ghorrocks November 10, 2010 17:31

You will need to do as I said - set up a monitor point which outputs the gas mass fraction and anything else you need. Look in the tutorials for setting up monitor points. You can then export the data, and use it as an 1D interpolation function for the inlet for the second simulation.

Why not just run it as one big simulation?

All times are GMT -4. The time now is 06:56.