CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to tell what needs to be specified for each solver?

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Yann
  • 1 Post By Ship Designer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2021, 18:56
Default How to tell what needs to be specified for each solver?
  #1
Member
 
Join Date: Feb 2013
Posts: 60
Rep Power: 13
ansys_matt is on a distinguished road
I didn't see this in the User Guide except that it says each solver needs different things specified for a successful run. For instance, icoFOAM needs only nu specified in transport properties and initial p and U, which I can tell by looking at the equations icoFOAM solves. Even still, just seeing nu in the equation doesn't mean I would know the correct symbol to use in the Transport Properties file -> nu, Nu, or NU, or KinemViscos or ? In this particular case I found it in the tutorials.

For other solvers, isn't there a list of the requirements for properties and files necessary to solve a problem?

I am using the User Guide from .org and not sure I can always rely on the material from .com.

Help?
ansys_matt is offline   Reply With Quote

Old   March 24, 2021, 04:09
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,057
Rep Power: 26
Yann will become famous soon enough
Hi Matt,


In my opinion, the best way is to look at the tutorials corresponding to the solver you want to use. You will get a functional case and hence will be able to see the required parameters you need to set in order to use this solver.



Cheers,
Yann
Ship Designer likes this.
Yann is online now   Reply With Quote

Old   April 10, 2021, 18:08
Default
  #3
Senior Member
 
Claudio Boezio
Join Date: May 2020
Location: Europe
Posts: 137
Rep Power: 6
Ship Designer is on a distinguished road
Hello Matt,

I agree with Yann, checking out how the solvers are used in the tutorials is a good starting point.

In addition, specifically for the required fields, every solver should have a source file called createFields.H. In there you will find the necessary fields that have to be supplied by the user as well as any fields that are generated by the solver. You'll have to figure out which are the ones you need to supply. There you'll also find the type of the fields e.g. volVectorField or volScalarField.

For other information you can execute the solver with any of these options or check which are available by typing <solver> -help in the command line:
Code:
-listFunctionObjects
-listFvOptions
-listMomentumTransportModels
-listRegisteredSwitches
-listScalarBCs
-listSwitches
-listUnsetSwitches
-listVectorBCs

e.g.
interFoam -listVectorBCs
Error messages are a good source of information if something is missing.

The settings in fvSolutions are another story I'm afraid. The tutorials don't always list all the possible settings for a particular solver, as default values are sometimes omitted from the dictionary. If you know the algorithm that is used, you can look up the source code of e.g. the PIMPLE algorithm. You should then find the source files called pimpleControl. In there you will find all possible settings and what their values are supposed to be, including default values at times. Be aware that sometimes additional settings might be defined in superclasses, so it might be necessary to work up the class inheritance chain.

For the fvSchemes, I stick with the tutorials and read the scheme descriptions, because I haven't found out how I can tell which schemes work with which field and with what solver.

So for details you won't get around looking at and studying the source code. I always keep a copy of the OF source code on my computer so that I can quickly browse through the source files and opening them with my favourite text editor. For searching and cross references, I find the extended code guides to work better.

I know that ideally there would be a complete manual for every solver and the source code is not a replacement for good documentation, but that's what's available at this time.

Have a nice weekend, Claudio
Yann likes this.
Ship Designer 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
Duplicate library entries when running a solver with custom library francescomarra OpenFOAM Programming & Development 3 May 17, 2022 08:37
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Divergence problem Smaras FLUENT 13 February 21, 2013 05:03
3d vof Smaras FLUENT 2 February 19, 2013 06:58
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


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