View Issue Details

IDProjectCategoryView StatusLast Update
0004156OpenFOAMBugpublic2024-09-26 15:46
ReporterTobermory Assigned Tohenry  
PrioritylowSeveritytrivialReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOtherOS Version(please specify)
Product Version12 
Fixed in Versiondev 
Summary0004156: documentation in the totalPressureFvPatchScalarField header
DescriptionThe documentation at the top of the totalPressureFvPatchScalarField.H file lists G as a parameter for the compressible supersonic case (case 4). The equation for the patch pressure is correct, but the definition of G is wrong in the text below: it states G = gamma/(1 - gamma). However, lines 73-78 of dynamicPressureFvPatchScalarField.C read:
                 const scalar gM1ByG = (gamma_ - 1)/gamma_;
  
                 operator==
                 (
                     p0p/pow(scalar(1) - psip*gM1ByG*K0mKp, 1/gM1ByG)
                 );

This coding is correct, and suggests that two changes are needed in the header documentation:
- the definition of G should ideally read: G = (gamma - 1)/gamma, to match the code
- a minus sign is needed in front of the G in the denominator of the expression for the case 4 patch pressure
       pp = p0 / [ 1 - G psi(...)]^(1/G)
For the latter, you could keep the plus sign in front of the G, but you will then need a negative sign in the 1/G exponent, so simplest is just to match the coding.
Additional InformationA further minor point to consider is that the use of gamma to specify both the compressibility regime and the specific heat ratio is a bit confusing ... until you look at the code. Can I suggest a trivial addition to the text in the 4th para, changing:

"The patch pressure is evaluated from the external conditions using one of the following expressions depending on the flow conditions and specification of compressibility:"

to

"The patch pressure is evaluated from the external conditions using one of the following expressions depending on the flow conditions and specification of compressibility (which is implemented through the gamma parameter):"

Alternatively, or in addition, change

"3. compressible transonic ( gamma = 1):"
"4. compressible supersonic ( gamma > 1):"

to

"3. compressible transonic ( set gamma = 1):"
"4. compressible supersonic ( set gamma > 1):"
TagsNo tags attached.

Activities

henry

2024-09-26 15:46

manager   ~0013418

Resolved by commit a86cdf729cc6e9b2ad9ea6dbf1d0d9be19e88bea

Issue History

Date Modified Username Field Change
2024-09-26 13:48 Tobermory New Issue
2024-09-26 15:46 henry Assigned To => henry
2024-09-26 15:46 henry Status new => resolved
2024-09-26 15:46 henry Resolution open => fixed
2024-09-26 15:46 henry Fixed in Version => dev
2024-09-26 15:46 henry Note Added: 0013418