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

[ansys fluent] save file name as output parameter

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 17, 2020, 12:39
Default [ansys fluent] save file name as output parameter
  #1
New Member
 
sekeun
Join Date: Mar 2020
Posts: 3
Rep Power: 6
skbme is on a distinguished road
I use a file>export>during calculation and save output results in Ansys fluent.

However, in grid independence study, results of the iterative simulation are overwrited to the same file name.

Is there a way to parameterize filename as output parameter so that i can impose different file name?

Thank you all.
skbme is offline   Reply With Quote

Old   April 17, 2020, 12:46
Default Saving Files
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
You can use %i in steady-state and %t in transient case within the file name. %i and %t are replaced by iteration and time-step number, resp. If filename is firstcase.cas.gz, you should write it as firstcase_%i.cas.gz. Fluent will automatically replace %i.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 17, 2020, 12:53
Default
  #3
New Member
 
sekeun
Join Date: Mar 2020
Posts: 3
Rep Power: 6
skbme is on a distinguished road
Quote:
Originally Posted by vinerm View Post
You can use %i in steady-state and %t in transient case within the file name. %i and %t are replaced by iteration and time-step number, resp. If filename is firstcase.cas.gz, you should write it as firstcase_%i.cas.gz. Fluent will automatically replace %i.
Thank you for your kindly answer.

But what i want is that, for example, for two different meshes first mesh(coarse mesh) simulation on same fluent setting, the results file saved as follows firstcase_1.cas.gz firstcase_2.cas.gz ... according to time steps.

And for the second mesh (dense mesh) simulation, i should write filename as follows secondcase_1.cas.gz secondcase_2.cas.gz for mesh independence test.

If we have n meshes, then first ~, second_timesteps, ... n_timesteps.

so i want filename as output parameter so that i can handle it in parameter dialog like in WB.

https://www.youtube.com/watch?v=J0vRBB5yv00
skbme is offline   Reply With Quote

Old   April 17, 2020, 12:55
Default Parameters
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
I am not very sure if I understand you correctly, but if you want to use an input parameter as file name, that may or may not be allowed. Better to use a journal to run the simulations and use commands with any name you want to save the files. If you are using WB, then WB will automatically name them separately, even in separate folders.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   April 17, 2020, 13:06
Default
  #5
New Member
 
sekeun
Join Date: Mar 2020
Posts: 3
Rep Power: 6
skbme is on a distinguished road
Quote:
Originally Posted by vinerm View Post
I am not very sure if I understand you correctly, but if you want to use an input parameter as file name, that may or may not be allowed. Better to use a journal to run the simulations and use commands with any name you want to save the files. If you are using WB, then WB will automatically name them separately, even in separate folders.
Hmm, not clear for me. what is journal? so this method can preset filename and automatically simulate multiple times in same fluent setting but different meshes?
skbme is offline   Reply With Quote

Old   April 17, 2020, 13:14
Default Journal
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 36
vinerm will become famous soon enough
Journals are text user interface commands that can do almost everything in Fluent, such as, loading a mesh, setting up a case, running it, post processing it, saving intermediate files, almost everything barring a small part. Look at

https://www.afs.enea.it/project/nept...t/main_pre.htm

Do note that journal commands are sequential and the sequence changes from model to model, though the top level commands remain as it is. Some of these also change from version to version due to additions or subtractions from Fluent. Best approach is to press Enter in Fluent and it will show all the top level commands. Then, you can type one of these and press enter. Then it will show you second level commands and so on. All the required commands to do something can be put in a text file and read in Fluent either from File > Read > Journal or via command f r-j; f stands for file, r-j for read-journal. It expects a name of a journal file as argument. An example to load a case and data file, run it for 100 iterations (steady-state), and then save it is as follows

file read-cas-dat nameOfTheCaseFile.cas.gz
it 100
file write-cas-dat nameOfTheCaseFile_%i.cas.gz
exit y

In the above example it is assumed that the names of the case file and data file are same. If those are not, then you have to replace the first line with two following lines

f r-c caseFileName.cas.gz
f r-d dataFilename.dat.gz

Rest will be as it is.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm 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
Using PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 36 July 16, 2024 04:52
OpenFoam "Permission denied" and "command not found" problems. iyidaniel@yahoo.co.uk OpenFOAM Running, Solving & CFD 11 January 2, 2018 07:47
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46


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