View Issue Details

IDProjectCategoryView StatusLast Update
0003449ThirdPartyBugpublic2020-02-09 18:57
Reporterhandrake0724 Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiondev 
Summary0003449: inconsistant behavior of atmBoundaryLayer and its subclasses per OpenFOAM version
DescriptionIn offshore field, sustainable wind profile is an issue for wind load prediction and there were some efforts (see OMAE2018-78699, NUMERICAL MODELING OF NEUTRALLY-STABLE AND SUSTAINABLE ATMOSPHERIC BOUNDARY LAYER FOR THE WIND LOAD ESTIMATION ON AN OFFSHORE PLATFORM).
I was involved in OMAE2018-78699 study which was a benchmark with various CFD solvers including StarCCM+, OpenFOAM, ReFresco and Fluent. At that time, sustainable wind profile was extended to k-omega model and Spalart-Allmaras model as well as k-epsilon which was provided in atmBoundaryLayer class. The benchmark was conducted with k-omega model and showed almost same result as k-epsilon model.
To extend atmBoundaryLayer for working with k-omega model is simple and just add omega member function in atmBoundaryLayer class,

tmp<scalarField> atmBoundaryLayer::omega(const vectorField& p) const
{
    return Ustar_/(kappa_*sqrt(Cmu_)*((zDir_ & p) - zGround_ + z0_));
}

and create atmBoundaryLayerInletOmega with modified constructor to use omega member function instead of epsilon as follows:

atmBoundaryLayerInletOmegaFvPatchScalarField::
atmBoundaryLayerInletOmegaFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchScalarField(p, iF, dict, false),
    atmBoundaryLayer(patch().Cf(), dict)
{
    scalarField::operator=(omega(patch().Cf()));
}

Recently, I ported my code to OpenFOAM-dev (tag: 20200208) to test wind profile and found wind profile did not match with the prescribed profile and even look different from the profile by k-epsilon.
I couldn't catch up with the recent changes in the turbulence model. so I tried to compare the profiles directly by running per OpenFOAM versions from 5, 6, 7 and dev.
version 4 and 5 showed almost same results and the results matched well with the fore-mentioned study.
From version 6, the profile behavior started to look different.

Until version 5, the sustainable wind profile worked well and the results were comparable to other CFD S/Ws. so it looks like a bug but not sure what caused the differences.
FYI, I uploaed a extended atmBoundaryLayer class and test case.
TagsNo tags attached.

Activities

handrake0724

2020-02-09 11:17

viewer  

testCase.tar.gz (4,617 bytes)
U-ke-OF4.png (29,631 bytes)   
U-ke-OF4.png (29,631 bytes)   
U-kw-OF4.png (29,673 bytes)   
U-kw-OF4.png (29,673 bytes)   
U-ke-OF6.png (30,849 bytes)   
U-ke-OF6.png (30,849 bytes)   
U-kw-OF6.png (32,443 bytes)   
U-kw-OF6.png (32,443 bytes)   

henry

2020-02-09 12:35

manager   ~0011155

Can you reproduce the problem with the standard implementation of atmBoundaryLayer in OpenFOAM-dev? I.e. provide a case in which the results are clearly better in OpenFOAM-5 than OpenFOAM-dev?

handrake0724

2020-02-09 14:42

viewer   ~0011156

with the same mesh, I have reproduced the case with OpenFOAM-dev and uploaded results. profiles calculated with OpenFOAM-dev has larger differences between profiles than OpenFOAM-5.
U-ke-OF5.png (32,064 bytes)   
U-ke-OF5.png (32,064 bytes)   
U-ke-OFdev.png (33,512 bytes)   
U-ke-OFdev.png (33,512 bytes)   
U-kw-OF5.png (31,999 bytes)   
U-kw-OF5.png (31,999 bytes)   
U-kw-OFdev.png (34,616 bytes)   
U-kw-OFdev.png (34,616 bytes)   

henry

2020-02-09 15:04

manager   ~0011157

Could you provide the case setup to run in OpenFOAM-5 and OpenFOAM-dev with standard models?

handrake0724

2020-02-09 15:07

viewer   ~0011158

case setup files are in testCase.tar.gz

henry

2020-02-09 15:13

manager   ~0011159

What specifically do you think in wrong with the results from OpenFOAM-dev? They look fine to me. Have you looked to see what changes between OpenFOAM-5 and OpenFOAM-dev is causing the differences you are not happy with and propose a change to the code?

handrake0724

2020-02-09 15:32

viewer   ~0011160

in OpenFOAM 5, the vertical distribution of velocity at each section were almost identical which was one of the goal I was involved in fore-mentioned study.
But, in the latest code, the vertical distribution showed relatively larger differences so I tried to track from which version the difference started.
It turned out the different behavior was observed from OpenFOAM 6.
I tried to figure out what was the cause but not sure at this stage.

henry

2020-02-09 15:44

manager   ~0011161

I ran the case in OpenFOAM-dev and OpenFOAM-6 and get the same solution. I will try OpenFOAM-5.

henry

2020-02-09 18:56

manager   ~0011163

The case is not setup correctly, it is 2D yet fixed value BCs are set on the front and back planes:

    port
    {
        type atmBoundaryLayerInletVelocity;
        #include "include/windprofile"
    }
    stbd
    {
        type atmBoundaryLayerInletVelocity;
        #include "include/windprofile"
    }

The difference in behaviour between 5 and dev is that atmBoundaryLayerInletVelocity used to fixedValue but is now inletOutlet which is more appropriate for complex cases but cannot be applied to the front, back and top of your case. It will be necessary to discuss your requirements in further detail and setup a case appropriately but this is user support.

henry

2020-02-09 18:57

manager   ~0011164

User support request.

Issue History

Date Modified Username Field Change
2020-02-09 11:17 handrake0724 New Issue
2020-02-09 11:17 handrake0724 File Added: atmBoundaryLayer.tar.gz
2020-02-09 11:17 handrake0724 File Added: testCase.tar.gz
2020-02-09 11:17 handrake0724 File Added: U-ke-OF4.png
2020-02-09 11:17 handrake0724 File Added: U-kw-OF4.png
2020-02-09 11:17 handrake0724 File Added: U-ke-OF6.png
2020-02-09 11:17 handrake0724 File Added: U-kw-OF6.png
2020-02-09 12:35 henry Note Added: 0011155
2020-02-09 14:42 handrake0724 File Added: U-ke-OF5.png
2020-02-09 14:42 handrake0724 File Added: U-ke-OFdev.png
2020-02-09 14:42 handrake0724 File Added: U-kw-OF5.png
2020-02-09 14:42 handrake0724 File Added: U-kw-OFdev.png
2020-02-09 14:42 handrake0724 Note Added: 0011156
2020-02-09 15:04 henry Note Added: 0011157
2020-02-09 15:07 handrake0724 Note Added: 0011158
2020-02-09 15:13 henry Note Added: 0011159
2020-02-09 15:32 handrake0724 Note Added: 0011160
2020-02-09 15:44 henry Note Added: 0011161
2020-02-09 18:56 henry Note Added: 0011163
2020-02-09 18:57 henry Assigned To => henry
2020-02-09 18:57 henry Status new => closed
2020-02-09 18:57 henry Resolution open => no change required
2020-02-09 18:57 henry Note Added: 0011164