View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003208 | OpenFOAM | Bug | public | 2019-03-27 14:25 | 2019-03-27 16:31 |
Reporter | kevnor | Assigned To | henry | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Fixed in Version | dev | ||||
Summary | 0003208: FPE in dynamicKEqn model on restart | ||||
Description | (also present in dev) Depending on the velocity field, starting / resuming a simulation using the dynamicKEqn turbulence model can result in a FPE due to negative values of the KK field created in ::correctNut(). I believe it should have an enforced minimum value, similar to the calls via ::Ce() and ::correct(). I've attached a suitable patch for openfoam-dev. | ||||
Tags | No tags attached. | ||||
|
dynamicKEqn.patch (738 bytes)
diff --git src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C index 02936f0db..dbee2a94d 100644 --- src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C +++ src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C @@ -117,10 +117,11 @@ void dynamicKEqn<BasicTurbulenceModel>::correctNut template<class BasicTurbulenceModel> void dynamicKEqn<BasicTurbulenceModel>::correctNut() { - const volScalarField KK + volScalarField KK ( 0.5*(filter_(magSqr(this->U_)) - magSqr(filter_(this->U_))) ); + KK.max(dimensionedScalar(KK.dimensions(), small)); correctNut(symm(fvc::grad(this->U_)), KK); } |
|
Thanks for the report. I have rationalized the calculation of KK and created a KK() function to avoid the code duplication and potential errors this often leads to. Fixed in OpenFOAM-dev by commit 87d3d2d3d0d9cbc98fb2b6644b262009c85a77f4 |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-03-27 14:25 | kevnor | New Issue | |
2019-03-27 14:25 | kevnor | File Added: dynamicKEqn.patch | |
2019-03-27 16:31 | henry | Assigned To | => henry |
2019-03-27 16:31 | henry | Status | new => resolved |
2019-03-27 16:31 | henry | Resolution | open => fixed |
2019-03-27 16:31 | henry | Fixed in Version | => dev |
2019-03-27 16:31 | henry | Note Added: 0010399 |