|
[Sponsors] |
Mismatch of dimensional units in modified-kEpsilon |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 16, 2024, 10:24 |
Mismatch of dimensional units in modified-kEpsilon
|
#1 |
Member
María Rosales
Join Date: Mar 2023
Location: Spain
Posts: 48
Rep Power: 3 |
Good day dear community,
I wanted to implement in OpenFOAM ESI 2306 a custom version of the kEpsilon turbulence model based on the model of: Van der Laan M.P., Sorensen N., Réthoré P.-E., Mann J., Kelly M. C., Troldborg N., Schepers J. G. & Machefaux E. (2015) An improved k -" model applied to a wind turbine wake in atmospheric turbulence Wind Energ. 2015; 18:889–907 DOI: 10.1002/we.1736 Van der Laan, M.P., Hansen, N., Sorensen, N. & Réthoré P.-E. (2015) Predicting wind farm wake interaction with RANS: an investigation of the Coriolis force Journal of Physics: Conference Series 625 (2015) 012026 DOI: 10.1088/1742-6596/625/1/012026 The model basis is to keep the same transport equations of turbulent kinetic energy (TKE or k), and dissipation rate (epsilon) as kEpsilon, BUT, only changing the way of how turbulent viscosity is computed. A next enhancement this author elaborated for his model was to incoporate a length-scale limiter in the production term in the dissipation equation, which follows the limiter that Apseley & Castro (1991) proposes for atmospheric flows. In the turbulence model that I attach in the zip file, you can find different from the standard kEpsilon that: 1) more dimensionedScalar are defined: Cr_ (which belongs to 1st model of Van der Laan) and GWind_, latitude_, Lmax_ (they are related to Apseley & Castro) 2) more volScalarFields: fp_ (which belongs to 1st model of Van der Laan) and f1_ and lt_ (these are new fields to approach theory of Apseley & Castro (2021) and Van der Laan (2015). 3) function correctNut() is modified, this part I can confirm there is no issue at it, works fine. 4) function correct() has been modified and it's the one that presents problems, although the code compiles. PROBLEM: At the end, I need to modify the production term on the dissipation transport equation, I intend to do that via volScalarField 'ablLimiter' which supposes to be a dimensionless value. The field of lt_ is the length scale formed by: (C_mu ^3/4) * (k^3/2) / epsilon --→ should retrieve unit of length only. The issue is that prior this field, ‘lt_’ ends to retrieve units of Time, so an error is launched to the terminal due inconsistency between how I define ‘lt_’ (dimLength) and how openfoam calculates lt_ (retrieves dimTime). I pretended to get ablLimiter dimensionless by making the ratio of (lt_ / Lmax_). As you can see, Lmax_ is a dimensionedScalar that has only unit of length and should cancel the length unit of lt_ when calculating ablLimiter. Someone before has this issue (Different dimensions for = dimensions : [0 2 -1 0 0 0 0] = [0 4 -3 0 0 0 0]) but their fix was to delete the phi file of the time step folder, but this does not work in my case. By printing on screen I have debugged what types of dimmensions carry each dimensionedScalar and field that is being treated, all of them by themselves looks fine EXCEPT FOR ‘lt_’ that already prompts conflict of units inconsistency. When running turbineSitting with simpleFoam (attached a tutorial case for testing) an example of the output is: Code:
Selecting RAS turbulence model kEpsilonFpWIND kEpsilonFpWINDCoeffs { Cmu 0.09; C1 1.44; C2 1.92; sigmaEps 1.11; GeoWind 7.52; latitude 8.5; Cr 4.5; C3 0; sigmak 1; Lmax 200; } No MRF models present Creating finite volume options from "constant/fvOptions" Selecting finite volume options type actuationDiskSource Source: disk1 - selecting cells using cellSet actuationDisk1 - selected 484 cell(s) with volume 49.2901917626 - selecting cells using points - creating actuation disk zone: disk1 - force computation method: Froude Selecting finite volume options type actuationDiskSource Source: disk2 - selecting cells using cellSet actuationDisk2 - selected 484 cell(s) with volume 49.2901999754 - selecting cells using points - creating actuation disk zone: disk2 - force computation method: Froude Starting time loop Time = 1 smoothSolver: Solving for Ux, Initial residual = 1, Final residual = 0.0333169653182, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1, Final residual = 0.0573539430882, No Iterations 3 smoothSolver: Solving for Uz, Initial residual = 1, Final residual = 0.0766166105561, No Iterations 2 GAMG: Solving for p, Initial residual = 1, Final residual = 0.0368913513513, No Iterations 4 time step continuity errors : sum local = 0.000208819683775, global = -4.47588709512e-05, cumulative = -4.47588709512e-05 The dimensions of f1 are [0 0 0 0 0 0 0] The dimensions of Lmax are [0 1 0 0 0 0 0] the geostrophic wind is: 7.52 and the latitude is: 8.5 so the maximum length scale of ABL is: 17.4353306896 The Cmu coefficient has dimensions: [0 0 0 0 0 0 0] The TKE k field has dimensions: [0 2 -2 0 0 0 0] The epsilon field has dimensions: [0 2 -3 0 0 0 0] --> FOAM FATAL ERROR: (openfoam-2306) Different dimensions for '(a = b)' dimensions : [0 1 0 0 0 0 0] != [0 0 1 0 0 0 0] From bool Foam::checkDims(const char*, const Foam::dimensionSet&, const Foam::dimensionSet&) in file dimensionSet/dimensionSet.C at line 56. FOAM aborting [stack trace] ============= #1 Foam::error::simpleExit(int, bool) in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so #2 Foam::error::exiting(int, bool) in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so #3 Foam::dimensionSet::operator=(Foam::dimensionSet const&) const in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so #4 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator=(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so #5 Foam::RASModels::kEpsilonFpWIND<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >::correct() in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/lib/libincompressibleTurbulenceModels.so #6 ? in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/bin/simpleFoam #7 ? in /lib/x86_64-linux-gnu/libc.so.6 #8 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #9 ? in /usr/lib/openfoam/openfoam2306/platforms/linux64GccDPInt32Opt/bin/simpleFoam ============= Aborted (core dumped) p { line-height: 115%; margin-bottom: 0.1in; background: transparent }a:link { color: #000080; text-decoration: underline } Last edited by MMRC; September 16, 2024 at 10:26. Reason: Uploading attachement |
|
Tags |
kepsilon model, openfoam, programming, turbulence model |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 22:00 |
SU2-7.0.1 on ubuntu 18.04 | hyunko | SU2 Installation | 7 | March 16, 2020 05:37 |
Using rhok for a modified kepsilon model. How to access to the value? | be_inspired | OpenFOAM Programming & Development | 1 | October 19, 2017 13:46 |
Make wall-function read a newly defined field inside modified kEpsilon model | Radunz | OpenFOAM Programming & Development | 2 | July 18, 2017 23:39 |
[OpenFOAM] could not open file .vtk in paraview | ali_atrian | ParaView | 8 | August 27, 2014 11:31 |