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

command to save data file every #time step in a batch script

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2022, 10:42
Default command to save data file every #time step in a batch script
  #1
IBC
New Member
 
Join Date: Jul 2021
Posts: 23
Rep Power: 3
IBC is on a distinguished road
Hi,

I'm running a batch simulation and need to save the cdat or dat file every # time step. I wrote the following commands but didn't work. Does anyone know what might be the error?

file/read-case FullyOpen_covedcorner_0.03m_real.cas
solve/initialize/initialize-flow
solve/set/time-step 0.01
solve/dual-time-iterate 30000 20
file/auto-save/save-data-file-every 6000
file/write-case-data FOFOFOFO_transientfive_real_result.cas
file/confirm-overwrite yes
exit
yes


Thanks!
IBC is offline   Reply With Quote

Old   July 10, 2022, 06:53
Default
  #2
Senior Member
 
alainislas's Avatar
 
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 101
Rep Power: 5
alainislas is on a distinguished road
You can use auto-execute commands. For instance, in your journal file you can add:

solve/execute-commands/add-edit command-1 6000 "time-step" "file/write-data FOFOFOFO_transientfive_real_result_%t.dat"

If your simulation is steady, you can replace %t (time step appended) for %i (which stands for iteration number)
alainislas is offline   Reply With Quote

Old   July 13, 2022, 15:54
Default
  #3
IBC
New Member
 
Join Date: Jul 2021
Posts: 23
Rep Power: 3
IBC is on a distinguished road
I tried this and it didn't work.

file/read-case-data FullyOpen_SS_Tran_0.020m.cas
solve/iterate 1
solve/set/time-step 0.01
solve/dual-time-iterate 30000 20
file/auto-save/data-frequency 6000
file/write-data SSTran_%t_result.dat
file/write-case 020m_SS_Tran_result.cas
file/confirm-overwrite yes
exit
yes
IBC is offline   Reply With Quote

Old   July 13, 2022, 15:58
Default
  #4
Senior Member
 
alainislas's Avatar
 
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 101
Rep Power: 5
alainislas is on a distinguished road
Please open a fresh session in interactive mode, try typing the commands one by one and debug. Some of your commands are a bit redundant.
alainislas is offline   Reply With Quote

Old   July 13, 2022, 16:02
Default
  #5
IBC
New Member
 
Join Date: Jul 2021
Posts: 23
Rep Power: 3
IBC is on a distinguished road
I'm trying to run this simulation using a batch script.
I'm not using a journal file, I am creating a run script.
IBC is offline   Reply With Quote

Old   July 13, 2022, 16:03
Default
  #6
Senior Member
 
alainislas's Avatar
 
Alain Islas
Join Date: Nov 2019
Location: Mexico
Posts: 101
Rep Power: 5
alainislas is on a distinguished road
Please post a screenshot of Fluent's console
alainislas is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 4 February 27, 2020 16:57
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 20:43
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 18:51


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