|
[Sponsors] |
April 29, 2015, 11:17 |
fvc::grad(U) in interFoam
|
#1 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
Hello everybody,
actually I have a problem with the discretisation of UEqn in InterFoam. As you can see from the source code, the term "fvc::grad(U)&fvc::grad(nu)" is subtracted; i guess to take into account the variable viscosity. But if I look deep into the source code of fvm::laplacian(nu,U), then the variable viscosity should already be treated. The volume integral of "Gradient(nu*Gradient(U))" is euqal to the surface integral over "nu*Gradient(U)" (Gauus theorem). And nu is interpolated to face centers, before matrix coefficients are calculated. Therefore the varibale viscosity is already taken into account, isn't it? So where does the explicit correction term comes from? Generall question: How can the Gradient of a vectorField be calculated? I followed the source code up to Foam::fv::gradScheme<Type>::grad. Then my skills in C++ metaprogramming fail. I can see the call of calcGrad in some cases (I don't really understand the if-condition), which would involve interpolation of U to surface centers and sum up the face area vectors*U: forAll(owner, facei) { GradType Sfssf = Sf[facei]*issf[facei]; igGrad[owner[facei]] += Sfssf; igGrad[neighbour[facei]] -= Sfssf; } Then I dont see the diverence to fvc::div(U), which should be zero all the time (pressure fields makes velocity field divergence free). Previous thanks for any answer. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
InterFoam stops after deltaT goes to 1e14 | francesco_b | OpenFOAM Running, Solving & CFD | 9 | July 25, 2020 06:36 |
interFoam vs. simpleFoam channel flow comparison | DanM | OpenFOAM Running, Solving & CFD | 12 | January 31, 2020 15:26 |
interFoam in parallel | gooya_kabir | OpenFOAM Running, Solving & CFD | 0 | December 9, 2013 05:09 |
Problem of InterFoam with LES SpalartAllmarasIDDES | keepfit | OpenFOAM | 3 | August 29, 2013 11:21 |
Open Channel Flow using InterFoam type solver | sxhdhi | OpenFOAM Running, Solving & CFD | 3 | May 5, 2009 21:58 |