View Issue Details

IDProjectCategoryView StatusLast Update
0004044OpenFOAMBugpublic2024-01-07 09:36
Reporternguyenhung97 Assigned Tohenry  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionunable to reproduce 
PlatformGNU/LinuxOSUbuntuOS Version15.04
Product Version10 
Summary0004044: Possibly wrong formula of laminar fully developed velocity profile in flowRateInletVelocity BC.
DescriptionThe laminar fully developed velocity profile in a pipe is usually defined as u(r) = 2*Umean*(1-(r/R)^2) where Umean is average velocity, r is the distance from center, R is the radius.
OpenFOAM implements this one by "operator==(avgU*profile*patch().nf()) which basically results in avgU = 2*Umean and profile = (1-(r/R)^2) according to the above formula.
However, as I analyzed, it could be wrong because of the following reason:
     * The profile is defined in laminarBLI.H as follows:
        profile = t*(2 - t) where t is the normalized distance to the wall. t is calculated in setWallDist() function as t = pwd/gMax(pwd) = point to wall distance / maximum point to wall
       distance. In terms of pipe properties, it can be re-interpreted as t = (R-r)/R = 1-(r/R). Therefore, the profile can be re-interpreted in terms of pipe properties as follows:
              profile = t*(2-t) = (1-(r/R)^2) (you can find the full derivation in the attachment)
     * The average velocity avgU is calculated based on volumetric flow rate as follows:
              avgU = -(scale*flowRate_->value(db().time().userTimeValue()))
                      /gSum(alpha*rho*profile*patch().magSf());
        As I understand, it basically divides the flowrate by the area of the patch so avgU = Umean.
     * Following the above reason, I suggest that OpenFOAM implements the laminar fully developed flow as u(r) = Umean*(1-(r/R)^2) so there is a factor of 2 missing here.
TagsNo tags attached.

Activities

nguyenhung97

2024-01-05 07:15

reporter  

photo_2024-01-05_16-13-23.jpg (98,547 bytes)   
photo_2024-01-05_16-13-23.jpg (98,547 bytes)   

henry

2024-01-05 09:02

manager   ~0013178

All the cases I have tested show that the current implementation generates the correct profile and mean velocity. Could you please supply the test case you have that show the result for your particular case is incorrect?

nguyenhung97

2024-01-07 05:48

reporter   ~0013179

After testing again, it seems ok to me too. However, I still have the concern about the math behind the codes as explained above. I do not understand where the factor of 2 comes from.

henry

2024-01-07 09:36

manager   ~0013180

The results from the current implementation are correct for all cases tested and the reporter is unable to provide a case demonstrating any problem.

Issue History

Date Modified Username Field Change
2024-01-05 07:15 nguyenhung97 New Issue
2024-01-05 07:15 nguyenhung97 File Added: photo_2024-01-05_16-13-23.jpg
2024-01-05 09:02 henry Note Added: 0013178
2024-01-07 05:48 nguyenhung97 Note Added: 0013179
2024-01-07 09:36 henry Assigned To => henry
2024-01-07 09:36 henry Status new => closed
2024-01-07 09:36 henry Resolution open => unable to reproduce
2024-01-07 09:36 henry Note Added: 0013180