|
[Sponsors] |
![]() |
![]() |
#1 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6 ![]() |
Hi my problem is that in my simulations some numeric values are very small, in regions of 1E-40 for example a approximation for a rate coefficient field :
Code:
k4.field() = 1.5E-40*pow(TGas.field()/300, -2.5); |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
Have a look at the machine epsilon table below, and compare it with your hardware:
Machine epsilon
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6 ![]() |
from python I got:
Code:
import sys sys.float_info.epsilon Out[2]: 2.220446049250313e-16 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12 ![]() |
yes, those numbers lower than the machepsilon ks mumbo jumbo most of the time to avoid fp exceptions.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
![]() |
![]() |
![]() |
![]() |
#5 | ||
Member
alexander thierfelder
Join Date: Dec 2019
Posts: 71
Rep Power: 6 ![]() |
Hi for everyone who sees this post, here is a complete discussion about the topic.
is double precision default of OF? in short: Quote:
|
|||
![]() |
![]() |
![]() |
Tags |
numerical, small, values |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 16:35 |
Set values of a volVectorField to zero | GustavGans | OpenFOAM Programming & Development | 12 | April 9, 2019 00:12 |
set a volScalarField values | anishtain4 | OpenFOAM | 1 | July 5, 2012 09:28 |
Numerical errors in nested domain with pre-calculated boundary values | Arnoldinho | OpenFOAM Running, Solving & CFD | 3 | April 4, 2012 10:31 |
Reference values set up Plz help! | pah | FLUENT | 0 | June 14, 2005 06:39 |