|
[Sponsors] |
how to make cfx automatically solve same model with different boundary conditions? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 7, 2018, 05:18 |
how to make cfx automatically solve same model with different boundary conditions?
|
#1 |
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 |
Hello, everyone. Here is the situation that I want to calculate the same model with outlet mass flow changing from 5kg/s to 15kg/s. I add 1kg/s every time so that is 10 results finally. I don't want to change the outlet boundary condition manually. Is there some way to realize it? I've already searched question on the internet but no detailed introduction was found. Thanks
|
|
November 7, 2018, 06:53 |
|
#2 |
Senior Member
urosgrivc
Join Date: Dec 2015
Location: Slovenija
Posts: 365
Rep Power: 12 |
Use parameters:
if you set your outlet as an expression you are able to set it as a parameter and then you are able to set up 10 simulations from workbench and run them one after the other automaticaly, without even opening cfxpre in the proces. just be sure to export all the needed data by that I mean output parameters (easily set in cfx post before you start your 10 simulations) that you observe and you need to be sure that the simulation is correctly solved before it goes to the next one. this process has great capabilities like genetic optimisation, response surface, etc. To make your outlet as an expression you can do this: Make an expression named, let us say; OutletMassFlow you then set this expression as; 5 [kg s^-1] this unit will be used when the expression is used in cfx and rightclick on the expresion and select (use as a workbench input parameter) This will make it visible as a parameter in the workbench automatically Than in the settings for outlet you call in this expression OutletMassFlow instead of writing in fixed walue Last edited by urosgrivc; November 9, 2018 at 09:54. |
|
November 7, 2018, 10:45 |
|
#3 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
What version of ANSYS CFX are you using?
If you check version R19.2 or later for the "operating maps" feature. You can set a variable to be changed during the simulation. You will obtain as many results file as variations you included in the setup. Say, you select mass flow from 1->5 kg/s in 10 increments. The software will start with 1 kg/s, once converged, it will start another simulation with 2 kg/s and so on until it finishes. In the future, we should be able to run the 10 simulations at the same time (assuming parallel licenses and resources available). The ANSYS Solver Manager monitor all the simulations for you automatically and give you a status which simulation failed, converged, etc. |
|
November 7, 2018, 11:28 |
|
#4 |
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 |
many thanks!!! I've tried this method just now and it's stilling running. Now I'm going back to sleep and check it out tomorrow morning. Wish you have a good day! ( ^_^ )
|
|
November 7, 2018, 18:41 |
|
#5 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144 |
An alternative approach is to generate a series of CCL files with the different flow rates defined and then run them in a batch file. This method allows you to do this sort of thing outside Workbench, if that is of interest.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
November 7, 2018, 21:02 |
|
#6 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
The operating maps functionality is a stand-alone feature independent of Workbench, not to be confused with design parameters.
|
|
November 8, 2018, 02:13 |
|
#7 |
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 |
ghorrocks, thank u very much! I used to write .bat file for fluent calculating. Now I learned how to write it in CFX format, it's also useful in situations when calculation needs lots of operation points.
|
|
November 8, 2018, 02:15 |
|
#8 |
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 |
||
November 8, 2018, 07:11 |
|
#9 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
If you have a def file called case.def, you can simply create a batch file containing commands like:
cfx5solve -def case.def -ccl 1kgs.ccl -name 1kgs cfx5solve -def case.def -ccl 2kgs.ccl -name 2kgs This will give you result files: 1kgs_001.res 2kgs_001.res where your ccl-file 1kgs.ccl only contains: FLOW: Flow Analysis 1 DOMAIN: domain1 BOUNDARY: inlet BOUNDARY CONDITIONS: MASS AND MOMENTUM: Mass Flow Rate = 1 [kg s^-1] END END END END END So you only need a small part of the ccl-tree. |
|
November 8, 2018, 07:17 |
|
#10 |
Senior Member
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,928
Rep Power: 28 |
When starting a case in the solver manager, you can also add these commands in the Solver-tab/Solver Arguments.
So, if you run case.def and add arguments "-ccl 1kgs.ccl -name 1kgs" then the result will be the same. But only 1 file at a time, manually.,,,,, |
|
November 9, 2018, 01:17 |
|
#11 | |
New Member
gengchen
Join Date: May 2018
Posts: 14
Rep Power: 8 |
Quote:
|
||
November 9, 2018, 09:21 |
|
#12 |
Senior Member
Join Date: Jun 2009
Posts: 1,880
Rep Power: 33 |
If this is a one-time effort, it does not matter much which approach you take.
However, if you expect to repeat this approach multiple times you are better off learning a feature which takes care of the nuisances of simulation management, file management, monitoring multiple runs, post-processing, etc. In either case, you are at the start of the learning curve. My 2 cents. |
|
Tags |
batch runs, ccl |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
convergenceof natural convection prob. in cfx | cpkewat | CFX | 15 | January 31, 2014 07:29 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
CFX doesn't continue calculation... | mactech001 | CFX | 6 | November 15, 2009 22:25 |