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

How to check the results of OpenFOAM Solver?

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 3 Post By RobertHB
  • 1 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 2, 2019, 11:53
Default How to check the results of OpenFOAM Solver?
  #1
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7
priyankap is on a distinguished road
Hello Everyone,


I am new to OpenFOAM and CFD. However, I have been reading about OpenFOAM and basics of CFD from a while now. I know the flow of solving a case in OpenFOAM which starts from making a geometry, then mesh and then solving it using a solver.



What I don't understand is,
1. How do we know that the solver has already solved my problem?



2. Where can I see the parameters changing?



3. I read that we know our problem is solved when solver converges. How can I check that the solver has converged already?


I have tried to understand the log which is generated by the solver but could really understand what it is happening inside it.
priyankap is offline   Reply With Quote

Old   April 3, 2019, 06:53
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
Originally Posted by priyankap View Post
1. How do we know that the solver has already solved my problem
There a two ways in which you can end a simulation. a) by reaching the endTime specified in your controlDict (mostly transient flows) or b) if the Initial residual (part of the console or log output) of a variable falls below the value defined in the fvSolution residualControl entry (steadyState flows). When looking for a converged steadyState solution, a solution can be concidered convered if the residual is below 1e-4. With lower values meaning better convergence and a residual of 1e-6 usually being enough. Meaning you won't gain much from running your simulation any longer.

Quote:
2. Where can I see the parameters changing?
You can observe the residuals in your console or log output. If you want the see a graphical representation of what is happening you will have to open your simulation results in paraview.

Quote:
3. I read that we know our problem is solved when solver converges. How can I check that the solver has converged already? I have tried to understand the log which is generated by the solver but could really understand what it is happening inside it.
I'll attach a snippet of one of my own logs and try to explain.
Code:
Time = 19999

smoothSolver:  Solving for Ux, Initial residual = 0.00476975, Final residual = 8.58411e-09, No Iterations 36
smoothSolver:  Solving for Uz, Initial residual = 0.0665207, Final residual = 9.32058e-09, No Iterations 42
[...]
GAMG:  Solving for p, Initial residual = 0.115453, Final residual = 8.04117e-09, No Iterations 39
[...]

 ExecutionTime = 566.98 s  ClockTime = 577 s
Ux: variable being solved.
Init. res.: Residual value at the beginning of the timestep.
Final res.: Residual value at the beginning of the timestep. If the final residual falls below the residualControl value your simulation end.
ExecutionTime is the time spend by your computer actually doing something and ClockTime being the time since you started your simulation.


You can also use runtime post-processing by including #includeFunc residuals in your control dict. This will write a file with all residuals for every timestep, which then can be plotted during runtime using the foamMonitor utility. As such you can graphically observe your residuals decreasing.
priyankap, Justin B and vava10 like this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   April 5, 2019, 09:38
Default
  #3
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 7
priyankap is on a distinguished road
Hello RobertHB,


Thanks a lot for your reply, it cleared many of my doubts. I was trying to understand the physics behind the calculations.


Now my question is:


Is it possible to verify a simple hand calculated problem on OpenFOAM.For example, I want to realise the heat transfer in a metal rod attached by an aluminium plate on both sides. I know the temperature of both plates. So, can I realise this case in OpenFOAM? If yes, do I get the value of heat flow rate in the log file?



Please excuse me if it was a silly question.



Thank you
priyankap is offline   Reply With Quote

Old   April 8, 2019, 04:18
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
Originally Posted by priyankap View Post
Now my question is:


Is it possible to verify a simple hand calculated problem on OpenFOAM.For example, I want to realise the heat transfer in a metal rod attached by an aluminium plate on both sides. I know the temperature of both plates. So, can I realise this case in OpenFOAM?
Sorry, i cant help you with this as i'm not dealing with this kind of simulation myself. But it sounds awfully complex to set up a simulation of you can calculate the results by hand.

Quote:
If yes, do I get the value of heat flow rate in the log file?
No. You would need to conduct some kind of post-processing e.g. using Paraview/Matlab. But i cant help you further since i dont know anything about heatflow.
priyankap likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Reply

Tags
solver convergence, solver flow


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
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
Comparison between OpenFoam and Fluent results chku24 OpenFOAM Running, Solving & CFD 2 January 19, 2020 20:52
OpenFOAM webinar: A multidimensional parallel numerical solver of ADM1 model for anae Gavin OpenFOAM Announcements from Other Sources 0 July 12, 2018 11:30
Very small Matlab job: post-processing OpenFOAM (.CSV) results RbBb CFD Freelancers 1 July 11, 2016 10:00
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 04:18


All times are GMT -4. The time now is 08:48.