|
[Sponsors] |
Are same schemes available using 2 differents fvc::div() constructors ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 8, 2021, 00:32 |
Are same schemes available using 2 differents fvc::div() constructors ?
|
#1 |
Member
Join Date: Jun 2019
Posts: 41
Rep Power: 6 |
Hi there. I use openfoam V8.
I've my own solver with some custom volVectorField. According to the banana method and https://cfd.direct/openfoam/user-guide/v8-fvSchemes/ for divergences schemes I can use some schemes with some limitors in order to make the divergence not to numerically explode. I'm interested with these schemes. In my simulation the classical velocity advection terme use this scheme, which is fine: Code:
div(phi,U) bounded Gauss upwind; Code:
div((gradPt*1)) bounded Gauss upwind; Code:
--> FOAM FATAL IO ERROR: unknown div scheme bounded Valid div schemes are : 1(Gauss) Code:
div((gradPt*1)) Gauss limitedLinear 1; Code:
wrong token type - expected word, found on line 84 the doubleScalar 1 Code:
div(phi,k) Gauss limitedLinear 1; What is the issue ? Are some schemes which are not available when explicitly calculating fvc::div(volVectorfield) instead of the more classical constructor fvc::div(surfacePhield,volVectorfield) ? For information my volVectorField is defined like this : Code:
volVectorField gradPt(fvc::grad(p)+0.5*fvc::grad(U&U)); volVectorField directionGradPt( gradPt*dimensionedScalar(pow(dimLength,-1)*pow(dimTime,2),1) ); forAll(directionGradPt,celli){ directionGradPt[celli] = (mag(gradPt[celli]) == 0)? vector::zero : directionGradPt[celli]/mag(gradPt[celli]); }; Thanks a lot.
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. » |
|
August 10, 2021, 04:43 |
|
#2 |
Member
Join Date: Jun 2019
Posts: 41
Rep Power: 6 |
In fact, looking in the whole tutorial folder with :
Code:
tut grep -ri div > tmp sed -i '/fvSchemes/!d' tmp sed -i '/divSchemes/d' tmp sed -i '/default/d' tmp sed -i '/,/d' tmp I got a 264 lines file with containes 264 times the Gauss linear scheme according to grep -ri "Gauss linear;" tmp | wc -l Thus why is there only this scheme available for a fvc::div() wich is not convective ? i.e not fvc::div(phi,thing) ? How can i limit such a divergence using another scheme ?
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. » |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interested in programming your own schemes? | Jesper_Roland | OpenFOAM Programming & Development | 16 | January 8, 2024 06:32 |
OF div schemes greatly influence the result | Samuel Twain | OpenFOAM Running, Solving & CFD | 4 | August 2, 2021 10:38 |
Fundamental questions about numerical schemes | Obad | OpenFOAM Running, Solving & CFD | 1 | May 10, 2021 10:40 |
Influence of schemes on mesh size, orientation and type in a convective flow field | Tobi | OpenFOAM Verification & Validation | 8 | July 16, 2017 08:01 |
time stepping schemes for compressible DNS/LES | shyamdsundar | Main CFD Forum | 0 | January 14, 2010 23:15 |