View Issue Details

IDProjectCategoryView StatusLast Update
0001940OpenFOAMBugpublic2015-12-05 16:17
Reporterjfp6 Assigned Tohenry  
PrioritylowSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Summary0001940: Antoine.C code needs a units change for log(p) in Tsat
DescriptionI 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 */
}
TagsNo tags attached.

Activities

henry

2015-12-05 16:17

manager   ~0005722

Resolved in OpenFOAM-3.0.x by commit 5ead44c48e611cd6d41e60d0676f96e51b9d1245
Resolved in OpenFOAM-dev by commit a13b036db3eee9973389bf113ebf2a344b8507cb

Issue History

Date Modified Username Field Change
2015-12-04 22:30 jfp6 New Issue
2015-12-05 16:17 henry Note Added: 0005722
2015-12-05 16:17 henry Status new => resolved
2015-12-05 16:17 henry Resolution open => fixed
2015-12-05 16:17 henry Assigned To => henry