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

Restart CFX simulation in batch mode using ccl

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 25, 2020, 08:48
Default Restart CFX simulation in batch mode using ccl
  #1
New Member
 
Join Date: Dec 2020
Posts: 7
Rep Power: 5
luk1 is on a distinguished road
Hi everyone,

I am running RANS-simulations in CFX 2020R2.
I did the setup of the simulation in CFX-Pre and created a .def-file from that: (RANS.def) which I then moved to the storage space on the cluster where I am working.

I use an .sh-script file (runCFX_1.sh) to execute the simulation in batch mode on the cluster. Since my settings in CFX-Pre for the convergence criteria (RMS with 1E-4) and the max. iterations of 1000 lead to unsatisfying results, I would like to restart the simulation from the latest iteration which is 1000 and go further up to 2000 iterations. During the first run, the files "RANS_001.res", "RANS_001.out" and the folder "RANS_001/" containing the files "900_full.bak", "reread" and "trn" were created.

I've read in some forums that you can use "-inject-commands" in the .sh-script in order to change parts of the settings in the batch mode. Therefore, I adjusted my runCFX_1.sh script and I created the file "newccl" that includes the code for setting the max. iterations up to 2000 and alterning the convergence criteria. Apart from that, I want to activate "double precision" from now on and so I used the command "-double" with the "cfx5solve"-command in my .sh-script.

When I execute the script, it seems to run properly but when I have a look into the newly created "RANS_002.out"-file I can see that double precision is activated while the settings to be changed using the "-inject-commands" function remain unaltered.

What do the files "runCFX_1.sh" and "newccl" have to look like to make it work?
Thanks for your help!

Here you find the codes:
runCFX_1.sh
Quote:
#!/bin/sh

#SBATCH --nodes=2
#SBATCH --ntasks-per-node=8
#SBATCH --partition=multiple_e
#SBATCH --time=20:00:00
#SBATCH --mem=50000mb
#SBATCH --constraint=LSDF

## setup environment
module load cae/ansys/2020R2
source cfxinit
hostlist=$(srun hostname -s)
hostlist=`echo $hostlist| sed 's/ /,/g'`

## start cfx
cfx5solve -def RANS.def -continue-from-file RANS_001.res -par-dist $hostlist -double -start-method 'Open MPI Distributed Parallel'

## control cfx
cfx5control RANS_001 -inject-commands newccl -no-backup
newccl
Quote:
FLOW: Flow Analysis 1
&replace SOLVER CONTROL:
CONVERGENCE CONTROL:
Maximum Number of Iterations = 2000
END
CONVERGENCE CRITERIA:
Conservation Target = 0.01
Residual Target = 0.00001
Residual Type = RMS
END
END
END
luk1 is offline   Reply With Quote

Old   December 26, 2020, 06:29
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,871
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I am not familiar with the command line argument "-continue-from-file". I have never used it. That does not mean it does not work, it just means I have no knowledge of it.

I use the "-initial" argument to set an initial condition for a cfx5solve run. Works for me. If you want to change the CCL before you start then do a "cfx5cmds -write -def DefinitionFile.def -text CCLFile.ccl" before you do the cfx5cmds. There are lots of other ways to do it but this is the way I do it and it works for me.
aero_head likes this.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   December 29, 2020, 16:37
Default
  #3
New Member
 
Join Date: Dec 2020
Posts: 7
Rep Power: 5
luk1 is on a distinguished road
Thanks a lot!

It worked with the command line you supposed (cfx5cmds -write -def DefinitionFile.def -text CCLFile.ccl). The only thing I had to change in addition was to put the entire source code from CFX-Pre into my new "newccl"-file and not only the part containing the settings that I wanted to change.
luk1 is offline   Reply With Quote

Reply


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
Monitoring in batch mode jmjohansen ANSYS 0 July 1, 2015 13:48
restart for batch mode Lawrence STAR-CD 2 April 11, 2010 19:05
Saving of monitor points in batch mode. Martijn CFX 3 December 10, 2008 11:36
Prosurf in batch mode Dhruv Siemens 1 September 19, 2005 19:02
Batch mode swapnil CFX 5 November 23, 2002 10:38


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