Difference between revisions of "FAQ/Solution procedure"

From OpenFOAMWiki
< FAQ
(FAQ Section faqnumber::4: faqname::Solution procedure: Added " Why doesn't my solver have any residuals for the velocity equations? ")
(How does one turn off the dimensional checking?: revised dimensional checking)
Line 8: Line 8:
 
=== How does one turn off the dimensional checking? ===
 
=== How does one turn off the dimensional checking? ===
  
Dimensional checking is one of the cool features in OpenFOAM that helps to develop solvers that do something physicaly meaningfull. Therefore: don't do this if not absolutely necessary.
+
Dimensional checking is one of the cool features in OpenFOAM that helps to develop solvers that do something physically meaningful. Therefore: don't do this if not absolutely necessary.
  
To switch it off at run-time set
+
To switch it off at run-time:
dimensionSet 0;
+
<pre>dimensionSet 0;</pre>
in <tt>OpenFOAM-1.1/.OpenFOAM-1.1/controlDict</tt>.
+
in the global {{tt|controlDict}} file or in the local one. A few example paths:
 +
* In OpenFOAM 1.1: <tt>OpenFOAM-1.1/.OpenFOAM-1.1/controlDict</tt>
 +
* In OpenFOAM 1.5 and newer: <tt>OpenFOAM-1.5/etc/controlDict</tt>
 +
 
 +
For more details on how to set these options, see section [[HowTo_debugging#Getting built-in feedback from OpenFOAM|Getting built-in feedback from OpenFOAM]] at [[HowTo_debugging]].
  
 
A more controlled way is to use the <tt>dimensions()</tt>-method to set the dimension of the  <tt>volXXXField</tt> in question to the desired dimension.
 
A more controlled way is to use the <tt>dimensions()</tt>-method to set the dimension of the  <tt>volXXXField</tt> in question to the desired dimension.
  
(source: [http://openfoam.cfd-online.com/forum/messages/1/616.html])
+
(source: [https://www.cfd-online.com/Forums/openfoam-solving/60598-how-does-one-turn-off-dimensional-checking.html How does one turn off the dimensional checking])
  
 
=== Is there a way to switch between single and double precision? ===
 
=== Is there a way to switch between single and double precision? ===

Revision as of 00:24, 27 December 2016


1 FAQ Section 4: Solution procedure

Manipulating the solution procedure by non-programming means

1.1 How does one turn off the dimensional checking?

Dimensional checking is one of the cool features in OpenFOAM that helps to develop solvers that do something physically meaningful. Therefore: don't do this if not absolutely necessary.

To switch it off at run-time:

dimensionSet 0;

in the global controlDict file or in the local one. A few example paths:

  • In OpenFOAM 1.1: OpenFOAM-1.1/.OpenFOAM-1.1/controlDict
  • In OpenFOAM 1.5 and newer: OpenFOAM-1.5/etc/controlDict

For more details on how to set these options, see section Getting built-in feedback from OpenFOAM at HowTo_debugging.

A more controlled way is to use the dimensions()-method to set the dimension of the volXXXField in question to the desired dimension.

(source: How does one turn off the dimensional checking)

1.2 Is there a way to switch between single and double precision?

For Version 1.2 and older: Only by editing src/OpenFOAM/primitives/scalar/scalar.H and recompiling OpenFOAM. But why would you want to do that (except for memory issues)? (source: [1])

For Version 1.3: Recompile OpenFOAM with single-precision enabled (for details see Howto_compile_OpenFOAM)


1.3 Why doesn't my solver have any residuals for the velocity equations?

  1. Edit the file system/fvSolution.
  2. Look inside the SIMPLE, PISO or PIMPLE block that you have configured for the solver you're using.
  3. You will find that you probably have momentumPredictor set to no.
Facts about "FAQ/Solution procedure"RDF feed
FaqdescriptionManipulating the solution procedure by non-programming means +
FaqnameSolution procedure +
Faqnumber4 +