|
[Sponsors] |
max function in Schnerr-Sauer Cavitation File |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 8, 2019, 16:39 |
max function in Schnerr-Sauer Cavitation File
|
#1 |
New Member
Join Date: Jul 2017
Posts: 4
Rep Power: 9 |
I am a bit unsure that the min/max functions are working properly in the Schnerr-Sauer cavitation model. The current code reads as:
Code:
Foam::Pair<Foam::tmp<Foam::volScalarField>> Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::mDotAlphal() const { const volScalarField& p = alpha1_.db().lookupObject<volScalarField>("p"); volScalarField pCoeff(this->pCoeff(p)); volScalarField limitedAlpha1(min(max(alpha1_, scalar(0)), scalar(1))); return Pair<tmp<volScalarField>> ( Cc_*limitedAlpha1*pCoeff*max(p - pSat(), p0_), Cv_*(1.0 + alphaNuc() - limitedAlpha1)*pCoeff*min(p - pSat(), p0_) ); } Any ideas how this can be corrected? Or am I interpreting the code incorrectly. Thanks |
|
Tags |
cavitation, openfoam, schnerr-sauer |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 | ordinary | OpenFOAM Installation | 19 | September 3, 2019 19:13 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |