CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Automation of boundary conditions during C-D nozzle simulation (https://www.cfd-online.com/Forums/fluent/246641-automation-boundary-conditions-during-c-d-nozzle-simulation.html)

mesik December 14, 2022 07:16

Automation of boundary conditions during C-D nozzle simulation
 
Dear Members of this Forum,

we are currently preparing experiments with shock waves at our university. For this purpose, we want to use shock waves that are generated when air flows through a convergent-divergent nozzle (Laval nozzle) at supercritical conditions.

First, we created an analytical model of the nozzle in the EES program. Then we moved to Ansys, where we verify the behavior of our geometry in different operating conditions. Currently, we have created a fully functional CFD simulation that shows us what, for example, the mass flow through the nozzle will be at a given pressure at the inlet and outlet. However, manually changing conditions and rewriting data into a table is relatively time-consuming and inefficient, and since humans are lazy creatures, we naturally try to simplify and automate the work as much as possible.

My question is quite simple:

Is it possible to set the automatic change of boundary conditions in Fluent when the convergence of the simulation is reached?

Specifically, I have a certain inlet pressure of, for example, 700 kPa. The simulation will converge. The value of the mass flow, outlet velocity magnitude, and Mach number will be written to the table, file, or graph, and then the inlet pressure is automatically changed, for example to 600 kPa. The simulation will converge again, the values will be recorded and the whole process is repeated again. All this will be in the previously set range of the inlet pressure in the given step of pressure.

It will probably be some combination of a procedure and inserting data using a table in a .txt file. Unfortunately, I have no idea how to implement all this in Solver. :confused:

Thank you in advance for any advice.:)

Mesik

AlexanderZ December 15, 2022 01:01

as you are lazy, could be complicated.

since 2022 version python is available, so you can run TUI commands from python script, which is really powerful as post-processing is very convenient

for version before you probably need scheme script with TUI commands, to settle up boundary and initial conditions, and check convergence criteria, once convergence is met I would read case (reference case) again and reset parameters according to your DOE
you will get some data\text file, but later would need additional job to organize it (by hands, or with additional python script for instance)

CFDKareem December 15, 2022 12:44

3 Attachment(s)
Quote:

Originally Posted by mesik (Post 841247)
Dear Members of this Forum,

we are currently preparing experiments with shock waves at our university. For this purpose, we want to use shock waves that are generated when air flows through a convergent-divergent nozzle (Laval nozzle) at supercritical conditions.

First, we created an analytical model of the nozzle in the EES program. Then we moved to Ansys, where we verify the behavior of our geometry in different operating conditions. Currently, we have created a fully functional CFD simulation that shows us what, for example, the mass flow through the nozzle will be at a given pressure at the inlet and outlet. However, manually changing conditions and rewriting data into a table is relatively time-consuming and inefficient, and since humans are lazy creatures, we naturally try to simplify and automate the work as much as possible.

My question is quite simple:

Is it possible to set the automatic change of boundary conditions in Fluent when the convergence of the simulation is reached?

Specifically, I have a certain inlet pressure of, for example, 700 kPa. The simulation will converge. The value of the mass flow, outlet velocity magnitude, and Mach number will be written to the table, file, or graph, and then the inlet pressure is automatically changed, for example to 600 kPa. The simulation will converge again, the values will be recorded and the whole process is repeated again. All this will be in the previously set range of the inlet pressure in the given step of pressure.

It will probably be some combination of a procedure and inserting data using a table in a .txt file. Unfortunately, I have no idea how to implement all this in Solver. :confused:

Thank you in advance for any advice.:)

Mesik

You can do this fairly easily using Workbench with parameters. You can set the inlet pressure as an input parameter. Then create report definitions for the values you want to export and select "Output Parameter". In workbench this will create a parametric table with the input and output parameters. Set all the input parameters you want and then click "Update all design points". This will run through each input parameter and save the output parameters for each design point.

Check the workbench user manual for more information on using parameter sets.


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