CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Automation of boundary conditions during C-D nozzle simulation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2022, 08:16
Default Automation of boundary conditions during C-D nozzle simulation
  #1
New Member
 
Zdeněk
Join Date: Feb 2014
Posts: 2
Rep Power: 0
mesik is on a distinguished road
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.

Thank you in advance for any advice.

Mesik
mesik is offline   Reply With Quote

Old   December 15, 2022, 02:01
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
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)
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   December 15, 2022, 13:44
Default
  #3
Senior Member
 
CFDKareem's Avatar
 
Kareem
Join Date: Nov 2022
Location: New York
Posts: 125
Rep Power: 4
CFDKareem is on a distinguished road
Quote:
Originally Posted by mesik View Post
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.

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.
Attached Images
File Type: jpg WorkbenchParameters.jpg (45.8 KB, 4 views)
File Type: jpg OutletParameter.jpg (95.2 KB, 6 views)
File Type: jpg InletParameter.jpg (128.4 KB, 5 views)
__________________
Please like the answer if it helped!

Video Tutorials and Tips: https://www.youtube.com/@cfdkareem/featured
CFDKareem is offline   Reply With Quote

Reply

Tags
boundary conditions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are the best settings for a channel flow simulation? Ashkan Kashani CFX 3 October 13, 2022 22:36
Centrifugal fan j0hnny CFX 13 October 1, 2019 14:55
Radiation in semi-transparent media with surface-to-surface model? mpeppels CFX 11 August 22, 2019 08:30
Velocity vector in impeller passage ngoc_tran_bao CFX 24 May 3, 2016 22:16
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 15:32


All times are GMT -4. The time now is 20:55.