|
[Sponsors] |
How to extract the normal pressure gradient from the momentum equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 18, 2017, 11:52 |
How to extract the normal pressure gradient from the momentum equation
|
#1 |
New Member
Join Date: Aug 2016
Posts: 19
Rep Power: 10 |
I would like to evaluate the normal pressure gradient to a patch by moving all terms (except for the pressure gradient term) to the right side, followed by a dot product with the normal to a patch:
[pressure gradient term] . n = ([unsteady term] + [convection term] + [diffusion term]) . n I can get the convection and the diffusion terms using UEqn.H(). How do I then proceed to perform the dot product between UEqn.H() and the normal to a patch? |
|
September 27, 2017, 02:57 |
|
#2 | |
Member
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10 |
Quote:
or scalarField& Pbf = p.boundaryField[patchID].Grad().component(normalDirec tion); where normaldirection is x=0, y=1 and z=2 |
||
September 27, 2017, 12:13 |
|
#3 |
New Member
Join Date: Aug 2016
Posts: 19
Rep Power: 10 |
Maybe my understanding is lacking so please correct me if I'm wrong. But I think the following:
My reason is that I am not sure whether computing dp/dn from gradients of p is identical to computing dp/dn as function of U. U and p are not fully coupled due to the segregated solution approach of SIMPLE/PISO/PIMPLE (especially if you use loose tolerances and/or a low number of correctors). So my conjecture is that the difference between p.boundaryField[patchID].snGrad() and -[fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U)] . n is larger than simply round-off errors. |
|
September 27, 2017, 16:56 |
|
#4 |
Member
Zhiheng Wang
Join Date: Mar 2016
Posts: 72
Rep Power: 10 |
What solver you are using if you are using some case built for buoyancy and gravity along with heat transfer visit this page
http://caefn.com/openfoam/solvers-bu...nesqpimplefoam Else interpolation of U corrects P as both are define at cell center in openFOAM like co-located variables. Coupling is all about to replace one in terms of other. I guess if you will extract dp/dn for incompresible or low mach number flows with out heat transfer and elevation there wont be any physical reason to change gradient of pressure along the flow accept velocity, but with heat transfer or buoyant flows density and elevation are considerable factors too. SO you better name the solver and case you are using that will be helpful to answer that dp/dn extracts thermodynamic pressure or buoyant pressure. Correct me if I am wrong Regards |
|
September 29, 2017, 10:50 |
|
#5 |
New Member
Join Date: Aug 2016
Posts: 19
Rep Power: 10 |
I am using pimpleFoam without any source terms (no gravity, buoyancy, etc.)
Anyway, I am almost there. I have the approximate code I need. Compiling, unfortunately, yields an error: error: no match for ‘operator&’ (operand types are ‘Foam::tmp<Foam::GeometricField<Foam::Vector<doubl e>, Foam::fvsPatchField, Foam::surfaceMesh> >’ and ‘const Foam::Field<Foam::Vector<double> >’) I am trying to do this: linearInterpolate(-(fvc::ddt(U) + fvc::div(phi, U) - fvc::laplacian(nu, U))) & mesh.boundaryMesh()[boundary_label("numericalBoundary")].faceNormals() So, in essence, I am trying to interpolate -(ddt(U) + div(phi, U) - laplacian(nu, U)) onto a patch which I named "numericalBoundary", and following this up by a dot product with the face normals of the patch. How should I correctly implement this interpolation followed by a dot product? |
|
Tags |
momentum equation, normals, patch, pressure gradient |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure Poisson equation | Zach_uky | CFD Freelancers | 0 | March 1, 2016 17:23 |
static vs. total pressure | auf dem feld | FLUENT | 17 | February 26, 2016 13:04 |
Pressure gradient normal to wall | steph79 | FLUENT | 0 | October 27, 2010 08:30 |
Derivation of Momentum Equation in Integral Form | Demonwolf | Main CFD Forum | 2 | October 29, 2009 19:53 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 15:57 |