View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001940 | OpenFOAM | Bug | public | 2015-12-04 22:30 | 2015-12-05 16:17 |
Reporter | jfp6 | Assigned To | henry | ||
Priority | low | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | GNU/Linux | OS | Ubuntu | OS Version | 15.04 |
Summary | 0001940: Antoine.C code needs a units change for log(p) in Tsat | ||||
Description | I am running the steamInjection tutorial in /home/joseph/OpenFOAM/OpenFOAM-3.0.x/tutorials/multiphase/reactingTwoPhaseEulerFoam/laminar/steamInjection with the change that I am switching the saturation model from constant to Antoine. I get the following error in the Tsat routine of Antoine.C where log(p) results in --> FOAM FATAL ERROR: Argument of trancendental function not dimensionless From function trans(const dimensionSet&) in file dimensionSet/dimensionSet.C at line 442. FOAM aborting This is because p is not unitless and log requires a unitless input. I propose dividing p by 1 with dimensions of p. I made this change to the source code, recompiled and the error was resolved. I show the change below. Foam::tmp<Foam::volScalarField> Foam::saturationModels::Antoine::Tsat ( const volScalarField& p ) const { // return B_/(log(p) - A_) - C_; /* Replace this line */ return B_/(log(p/dimensionedScalar("one", dimPressure, 1)) - A_) - C_; /* with this one */ } | ||||
Tags | No tags attached. | ||||