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 Community New Posts Updated Threads Search

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 1, 2022, 07: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, 08:31
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 729
Blog Entries: 1
Rep Power: 17
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, 09: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, 11:08
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 729
Blog Entries: 1
Rep Power: 17
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


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


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