Problems with FAM (fac::grad)
Hello Dear Forum Users,
as I'm new to the forum firstly I would like to say hi and thank you for all the helpful answers you've done already. I started of with OpenFoam few weeks ago and found help here multiple times yet. Right now I'm stuck for quite a while and can't help me for myself (still I hope it's quite an easy and trivial problem and it's just due to my inability)... I'm using foam extend 3.2 and try to write a solver for the shallow water equations based on the finite-area-method. Implementing the equations was straight-forward but while performing some calculations I get an error when compiling: Code:
// S and H: areaScalarFields, g: dimensionedScalar Code:
/foam-extend-3.2/foam-extend-3.2/src/finiteArea/lnInclude/facGrad.C:58:47: - fac::grad(ssf) just calls fac::edgeIntegrate(ssf.mesh().Sf() * ssf) (where ssf is an edgeMesh) - ssf.mesh() returns acess to the polyMesh of the faMesh - the polyMesh should have the member Sf() (returning the surface normal vectors) Playing around, I tried for example Code:
areaVectorField absWLGrad = fac::edgeIntegrate(absWLEdge.mesh().Le() * absWLEdge); This compiled but I got unphysical results... And, first of all, I do think that the errors much more likely to be caused by me than by a bug ;) I'm a little desperate right now and can't find that much documentation about the FAM... any help or comment would be appreciated! Thank you very much! Martin |
Just in case anybody else stumbles across this:
In the end it worked fine for me when I just left out the middle-line: Code:
areaScalarField absWL = g*(S+H); |
Quote:
I found there is a problem related to fac::grad() in patch junction. Which I explained here: https://www.cfd-online.com/Forums/op...-2-famesh.html. If you have understand how to use it or also in doubt, welcome you to discuss it. Thank you. |
All times are GMT -4. The time now is 02:21. |