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

CD and CL convergence history get overwritten

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

Like Tree2Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 18, 2013, 08:23
Default CD and CL convergence history get overwritten
  #1
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
I'm running a simulation on a cluster, so I direct all actions through a journal file.
In that file I enable the drag and lift monitors as follows:

Code:
/solve/monitors/force/drag-coefficient y wall-air () y y "./output/cd-25" n n 0 0 -1
/solve/monitors/force/lift-coefficient y wall-air () y y "./output/cl-25" n n 0 1 0
Both monitors get written to a file (cd-25 and cl-25) but Fluent (v14) overwrites the file on every time step (it's a transient 3D simulation)
This means that I don't get a list of values, but the file is constantly updated with a new value during the simulation.
What I want is a list of time and cl or cd values, how do I enable that?
ziggo is offline   Reply With Quote

Old   July 18, 2013, 10:06
Default
  #2
Senior Member
 
Join Date: Aug 2011
Posts: 315
Rep Power: 12
blackmask will become famous soon enough
Try
Code:
/solve/monitors/force/set-drag-monitor cd-1 yes wall-air () yes yes "./output/cd-25" no no 0 0 -1 
/solve/monitors/force/set-force-monitor cl-1 yes wall-air () yes yes "./output/cl-25" no no 0 1 0
blackmask is offline   Reply With Quote

Old   July 18, 2013, 12:07
Default
  #3
Far
Super Moderator
 
Far's Avatar
 
Sijal Ahmed Memon (turboenginner@gmail.com)
Join Date: Mar 2009
Location: Islamabad Pakistan
Posts: 3,969
Blog Entries: 6
Rep Power: 39
Far will become famous soon enoughFar will become famous soon enough
Send a message via Skype™ to Far
http://hpc.hud.ac.uk/w/images/2/2b/F..._Reference.pdf
Far is offline   Reply With Quote

Old   July 19, 2013, 11:41
Default
  #4
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
@blackmask:
Thank you for the suggestion but both Fluent v14 and v13 say that those are invalid commands.
My original commands work with v13 as they should. A list of CL and CD values is stored in a text file for every timestep. The file is not overwritten every time.

@Far:
Thank you for trying to help me. Could you please be a bit more specific on what you wanted to refer to in that document? I searched for drag and monitor, but found nothing that resembles the code I had.

Last edited by ziggo; July 19, 2013 at 12:27. Reason: additional knowledge
ziggo is offline   Reply With Quote

Old   July 21, 2013, 12:52
Default convergence criteria
  #5
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 4
star is on a distinguished road
Hello friends. I just started to work on Fluent 14.0. I am learning it to simulate flow around an airfoil. I want to ask a basic question.
How will we know that solution has converged? Is it depend on the value of Residuals which we set? and if it converges, it means the solution is correct?
I will thankful if somebody help me...
star is offline   Reply With Quote

Old   July 21, 2013, 17:20
Default
  #6
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
Hi Star,

This topic is not about your subject. Please search the forums or ask a new question in a separate topic (in the Fluent forum). But please search first.
ziggo is offline   Reply With Quote

Old   July 22, 2013, 14:19
Default
  #7
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
@blackmask
I tinkered around with your proposed solution and found the correct one.
It is as follows:

Code:
/solve/monitors/force/set-drag-monitor cd-1 yes wall-air () yes yes "./output/cd-25" no no 0 0 -1 
/solve/monitors/force/set-lift-monitor cl-1 yes wall-air () yes yes "./output/cl-25" no no 0 1 0
It was lift-monitor instead of force-monitor. This code only works in fluent v14. For v13 the code I originally posted works. Thank you for your help.
behest likes this.
ziggo is offline   Reply With Quote

Old   August 16, 2013, 19:51
Default
  #8
Member
 
Ali.E
Join Date: Sep 2010
Location: Lisboa
Posts: 78
Rep Power: 6
behest is on a distinguished road
Hi my friend
Thank you very much for your guidline. Actually, I am simulating a fluid flow around a 3D wing, transient, by Fluent 14. I also have the same problem with you and I can not obtain convergence history of CL and CD. The values are updated in every time step and replace.
It would be appriciated if you help me and give me more details how was solved your problem.

cheers,

Quote:
Originally Posted by ziggo View Post
@blackmask
I tinkered around with your proposed solution and found the correct one.
It is as follows:

Code:
/solve/monitors/force/set-drag-monitor cd-1 yes wall-air () yes yes "./output/cd-25" no no 0 0 -1 
/solve/monitors/force/set-lift-monitor cl-1 yes wall-air () yes yes "./output/cl-25" no no 0 1 0
It was lift-monitor instead of force-monitor. This code only works in fluent v14. For v13 the code I originally posted works. Thank you for your help.
behest is offline   Reply With Quote

Old   August 17, 2013, 03:01
Default
  #9
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
How does your code look? Can you post your commands that write the CD and CL history, just as I did in my first post?
ziggo is offline   Reply With Quote

Old   August 17, 2013, 05:43
Default
  #10
Member
 
Ali.E
Join Date: Sep 2010
Location: Lisboa
Posts: 78
Rep Power: 6
behest is on a distinguished road
Actually, we applied Fluent 14 software and we create 2 commands in "calculation activities" like below:
/solve/monitors/force/set-drag-monitor cd-1 yes wing () yes yes "./output/cd-25" no no 0 0 1
/solve/monitors/force/set-lift-monitor cl-1 yes wing () yes yes "./output/cl-25" no no 0 1 0
I enclose a picture from the software too.
The code is the last one you suggested, but the problem has not solved yet. Please make any comments

Quote:
Originally Posted by ziggo View Post
How does your code look? Can you post your commands that write the CD and CL history, just as I did in my first post?
Attached Images
File Type: jpg command.jpg (70.4 KB, 55 views)
behest is offline   Reply With Quote

Old   August 17, 2013, 13:13
Default
  #11
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
From your screenshot I see that you're executing the command every iteration.
As the command sets up a force monitor with the name cd-1 (or cl-1) which writes to the file cd-25 (or dl-25) in the folder output. With your situation every iteration a force monitor is setup with the same name and the same output file, so naturally the force history gets overwritten every iteration.

As you're not using the text user interface I would not recommend using the two lines of code I supply in my post. I'm not sure you understand what they do, so the outcome might not be what you want.
It's easier to use the graphical user interface.

1) Go to the Monitors tab
2) Press Create -> Drag
3) Fill in the form
4) Do the same with Create -> Lift
ziggo is offline   Reply With Quote

Old   August 18, 2013, 12:38
Default
  #12
Member
 
Ali.E
Join Date: Sep 2010
Location: Lisboa
Posts: 78
Rep Power: 6
behest is on a distinguished road
Thank you very much. Unfortunately, I applied graphical user interface, too; and as you said, I used monitors tab and lift and drag was created and their forms were filled out, too. But The files were overwritten again. The software writes last time step results to the files.
Please make a comment and help me to solve it. I need a convergence history.
May you learn me exactly what you did? How can I use text user interface?
behest is offline   Reply With Quote

Old   August 18, 2013, 15:15
Default
  #13
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
When you setup the lift and drag monitors through the Monitors tab only everything should work as expected and the force history should be saved.

Perhaps you ran the simulation both with the monitors set through the Monitors tab and through the Calculation Activities?

Below you can find the steps to use the Text User Interface (TUI):

1] Click in the command window. That's where it says "Interrupting client" and "Done." in your screenshot.

2] Hit enter. A list of menu items appears. One is "solve/".

3] Type solve and hit enter twice. You are now in the "solve" menu and you see a list of different commands in that menu. If you want to go up to the main menu type "q" and hit enter.

4] Type "monitors" and hit enter twice. You are now in the "monitors" menu that contains different menu items. One of them is "force/".

5] Type "force", hit enter twice.

6] Type "clear-monitors", hit enter and then type "yes". This will delete any monitors you've previously set. This prevents any monitors being created with the same name, but make sure you recreate all the monitors you had through the TUI.

7] Type "set-lift-monitor" to setup a lift force monitor. Then type in the desired monitor name. The default is shown in between square brackets (it's cl-1 on my machine). Name it anything you want or don't type anything and hit enter to keep the default.

8] Fluent now will ask you questions to setup the monitors. When it asks for "zone id/name(1)" type in the name of the object on which the force will work. If everything is correct you defined this name yourself as a named selection. If you don't know the name look it up through "Display -> Mesh" in the menu bar. You can now show/hide different surfaces and find the name of the surface you want to know the forces for.

9] Next it asks for a second zone for which forces should be monitored. Leave it empty by just hitting enter.

10] "Print data?" refers to the printing of the data to the command window during the simulation. Answer whatever suits you most.

11] "Write data?" refers to the force history you're after. Type "yes" hit enter and then type a convenient filename for it.

12] "Plot data?" answer "yes" if you want to see the force monitor data plotted during the simulation. Define a window id for the plot in the next question, the default value should be ok.

13] "Plot per zone" should be set to "no" if you're only monitoring one surface.

14] "x/y/z-component of lift vector". The answer to these three questions really depends on how you've setup your simulation. If your flow is in the direction of the negative z-axis and your y-axis is pointing upwards the x-component of the lift monitor should be 0, y-component 1 and z-component 0. But again, decide this for yourself according to the situation you're simulating.

15] Now you're back again in the "force" menu.

Now you've setup the lift monitor and I hope you understand, based on this experience, how to setup the drag monitor.

Make sure that the commands you're showing in the screenshot are not executed every iteration.
ziggo is offline   Reply With Quote

Old   August 20, 2013, 14:27
Default
  #14
Member
 
Ali.E
Join Date: Sep 2010
Location: Lisboa
Posts: 78
Rep Power: 6
behest is on a distinguished road
Thank you very much my friend. Your comment is very helpful.
I did do all steps that you said. It works when I select the serial in the processing options, Fluent Launcher. But when I want to use the parallel option, the convergence history files will be overwritten again.
Do you have any solution to solve it? Actually, the mesh is very big and I should use the parallel process
behest is offline   Reply With Quote

Old   August 20, 2013, 15:24
Default
  #15
Member
 
Bart A.
Join Date: Feb 2012
Posts: 45
Rep Power: 5
ziggo is on a distinguished road
If it works in serial mode it should work in parallel as well if you do the exact same steps. As far as I know there should be no difference.

I would advise opening up a new thread on this forum with the serial/parallel problem as it seems unrelated to the original question of this thread.
ziggo is offline   Reply With Quote

Old   December 13, 2013, 11:09
Default Solution
  #16
New Member
 
Guillaume Bidan
Join Date: Feb 2011
Posts: 2
Rep Power: 0
Guitou is on a distinguished road
Ok, I had the same problem with v14.5.7, and had encountered the same problem in the past with other versions. I did find a solution. I remembered I didn't have the issue when running on HPC clusters, so I thought there was an issue with this feature when used from the GUI.

To get your files to increment rather than be overwritten, you can launch your computation without the GUI. Just run it (I'm talking linux here, but I'm pretty sure you can do the same in windows) using the "fluent -t nprocx -g -i journal.jou". I use a journal to launch the computation and it works well. You can make you journal very short by setting everything up in the case file from the GUI, save the case file, and then launch from the command line using the command above. in this case, the journal is simply :

/file/read-case "fluent_simulation.cas"
/file/read-data "fluent_simulation.dat"
/solve/dual-time-iterate
20
1000
yes
yes
/exit
yes
I don't know if it works without the journal by just typing those commands in the command line (I don't see why it wouldn't), but you can try it.

Hope this helps !
Guitou is offline   Reply With Quote

Old   December 20, 2013, 00:05
Default
  #17
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 4
star is on a distinguished road
Thanks Guitou for your help. Because of history overwriting problem i switch to fluent 6.3 instead of Ansys 14.0. I didn't get the procedure completely which you have shown. I am using window 7. Can you please write in steps what and how to write journal file to get CL history. e.g I want to get CL history after every 1e-04 sec. I will be thankful. Thanks in advance.
star is offline   Reply With Quote

Old   December 20, 2013, 15:01
Default
  #18
New Member
 
Guillaume Bidan
Join Date: Feb 2011
Posts: 2
Rep Power: 0
Guitou is on a distinguished road
I don't really know if it is any different in windows 7 since I only have my Fluent under linux. However, I'm pretty sure you can still launch from the command window under win7, which is the principal step.

  1. First, from the GUI, setup you case file all the way including setting up the proper time step, convergence criteria, monitors (drag and lift) etc... Basically everything you would do and stop before clicking the "calculate" button. Save your case file, data file, and close the fluent GUI.
  2. Then you need to write a journal file (e.g journal.jou) which basically contains all the command you'll want to run in fluent. Usually, it's reading the case file, reading the data file, and run the calculation. The journal should be something like that:
    Code:
    /file/read-case "your_fluent_simulation.cas"
    /file/read-data "your_fluent_simulation.dat"
    /solve/dual-time-iterate 
    20 
    1000
    /exit 
    yes
  3. Then you need to launch fluent from the command line without gui, and read the journal. Open the command line and go in the folder where your case, data, and journal files are located and type:
    Code:
    fluent -v2ddp -tnx -g -i journal.jou
    of course, change the -v2ddp to whatever solver you want (3ddp, 3d, 2d) and the -tnx so that nx reflects the number of processors you want to use (if you want to run serial, remove that option).

If you want a 1e-4 time step in your CL, Cd, you need to solve with a time step of 1e-4 at least. If you don't want to setup the Cl and Cd in the gui, you can add these lines in the journal, before the dual-time-iterate line:

Code:
/solve/monitors/force/drag-coefficient y wall-zone () y y "./output/cd-file-name" n n 0 0 -1
/solve/monitors/force/lift-coefficient y wall-zone () y y "./output/cl-file-name" n n 0 1 0
Your output files will be in the folder you're running from.
I hope this helps...
guxin7005 likes this.
Guitou is offline   Reply With Quote

Old   November 10, 2014, 15:12
Default
  #19
New Member
 
xin
Join Date: Dec 2013
Posts: 18
Rep Power: 3
guxin7005 is on a distinguished road
use jou file in GUI can solve the overwriting problem. Thank you a lot!

Quote:
Originally Posted by Guitou View Post
I don't really know if it is any different in windows 7 since I only have my Fluent under linux. However, I'm pretty sure you can still launch from the command window under win7, which is the principal step.

  1. First, from the GUI, setup you case file all the way including setting up the proper time step, convergence criteria, monitors (drag and lift) etc... Basically everything you would do and stop before clicking the "calculate" button. Save your case file, data file, and close the fluent GUI.
  2. Then you need to write a journal file (e.g journal.jou) which basically contains all the command you'll want to run in fluent. Usually, it's reading the case file, reading the data file, and run the calculation. The journal should be something like that:
    Code:
    /file/read-case "your_fluent_simulation.cas"
    /file/read-data "your_fluent_simulation.dat"
    /solve/dual-time-iterate 
    20 
    1000
    /exit 
    yes
  3. Then you need to launch fluent from the command line without gui, and read the journal. Open the command line and go in the folder where your case, data, and journal files are located and type:
    Code:
    fluent -v2ddp -tnx -g -i journal.jou
    of course, change the -v2ddp to whatever solver you want (3ddp, 3d, 2d) and the -tnx so that nx reflects the number of processors you want to use (if you want to run serial, remove that option).

If you want a 1e-4 time step in your CL, Cd, you need to solve with a time step of 1e-4 at least. If you don't want to setup the Cl and Cd in the gui, you can add these lines in the journal, before the dual-time-iterate line:

Code:
/solve/monitors/force/drag-coefficient y wall-zone () y y "./output/cd-file-name" n n 0 0 -1
/solve/monitors/force/lift-coefficient y wall-zone () y y "./output/cl-file-name" n n 0 1 0
Your output files will be in the folder you're running from.
I hope this helps...
guxin7005 is offline   Reply With Quote

Old   December 9, 2014, 15:15
Default
  #20
New Member
 
Jeremy F.
Join Date: Nov 2014
Posts: 1
Rep Power: 0
jfjf1g12 is on a distinguished road
Hi guys,

I am running a transient solution for a ship propeller. I have a similar problem that is I can't seem to save my Cl convergence history. I tried using the method above but the journal file returns an error after the last iteration of that time step. It seems that it is not able to save the Cl data. Any ideas on why is that?

Kind regards,
Jeremy
jfjf1g12 is offline   Reply With Quote

Reply

Tags
drag coefficient, fluent 14, lift coefficient, monitors

Thread Tools
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 On
Pingbacks are On
Refbacks are On



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