CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem running a steady state case using simpleFoam

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

Like Tree2Likes
  • 1 Post By dlahaye
  • 1 Post By dlahaye

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2022, 08:31
Question Problem running a steady state case using simpleFoam
  #1
New Member
 
Smruti Ranjan Jena
Join Date: Jan 2017
Location: Odisha, India
Posts: 5
Rep Power: 9
sr71blackbird is on a distinguished road
Hi Everyone,

At present I am trying to simulate the case of flow past a square cylinder at Re=10 using simpleFoam (v20.12). As I am trying to run a steady laminar flow case, I have changed the simulationType from default RAS to "laminar" in the constant/turbulenceProperties file and all other input data are left untouched.

However, when I look at the drag coefficients value after running it for t_end=100000, it seems like the code has diverged as I get Cd value of the order 1.0e+9. I am sure grid & timestep doesn't have any issues at all. I would truly appreciate any kind of suggestions by the community.

Regards,
Smruti
sr71blackbird is offline   Reply With Quote

Old   August 1, 2022, 09:31
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Looking into residual norm using e.g. foamLog ?
sr71blackbird likes this.
dlahaye is offline   Reply With Quote

Old   August 1, 2022, 10:04
Question
  #3
New Member
 
Smruti Ranjan Jena
Join Date: Jan 2017
Location: Odisha, India
Posts: 5
Rep Power: 9
sr71blackbird is on a distinguished road
Thanks for your reply.

I could open the log file where I am saving all the output residuals, but if I could print those residuals (of Ux, Uy and p) vs the iteration counter then that would be great. Any ideas or suggestions?

I would also like to know why did you suggest to look into residual norms?

Thanks,
Smruti
sr71blackbird is offline   Reply With Quote

Old   August 1, 2022, 12:08
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Residual norms are likely more informative than drag coefficient.

Plotting the residual norm of various fields vs. iteration number

* write residual norms of the various fields to file instead of to screen. Do so using so-called unix pipe command, e.g., simpleFoam >& log.simpleFoam or use the runApplication utility instead (typically inside of Allrun);
* use foamLog utility to generate the the logs-directory in the case directory; foamLog runs a bunch of scripting commands to read data from the log-file and reorders the information in separate files;
* use gnuplot to load and plot the data in the logs-directory: in separate terminal run ./myplot. See sample myplot file below

Sample myplot file to plot residual norm vs. iteration number

#!/bin/bash

# Requires running foamLog <log-file> first!!

gnuplot -persist >/dev/null 2>&2 << EOF
set logscale y
plot "logs/UxFinalRes_0" with lines, \
"logs/UyFinalRes_0" with lines, \
"logs/UzFinalRes_0" with lines, \
"logs/pFinalRes_0" with lines, \
"logs/kFinalRes_0" with lines, \
"logs/epsilonFinalRes_0" with lines
sr71blackbird likes this.
dlahaye is offline   Reply With Quote

Reply

Tags
openfaom, simplefoam, square cylinder, steady state

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
Upwind Scheme Steady State Problem ugurtan666 SU2 0 January 19, 2022 09:42
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 06:21
Problem running simpleFoam on a multi element airfoil vinz OpenFOAM Running, Solving & CFD 18 April 11, 2013 12:26
transient problem run in steady state luigi FLUENT 4 March 13, 2008 07:54
About the difference between steady and unsteady problems Lisa Main CFD Forum 11 July 5, 2000 15:37


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