|
[Sponsors] |
December 14, 2017, 06:14 |
Problems with FAM (fac::grad)
|
#1 |
New Member
Martin Kerz
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
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 areaScalarField absWL = g*(S+H); edgeScalarField absWLEdge = fac::interpolate(absWL); areaVectorField absWLGrad = fac::grad(absWLEdge); Code:
/foam-extend-3.2/foam-extend-3.2/src/finiteArea/lnInclude/facGrad.C:58:47: error: ‘const Mesh’ has no member named ‘Sf’ return fac::edgeIntegrate(ssf.mesh().Sf() * ssf); - 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 |
|
January 17, 2018, 10:34 |
|
#2 |
New Member
Martin Kerz
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
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); areaVectorField absWLGrad = fac::grad(absWL); |
|
March 13, 2018, 09:08 |
|
#3 | |
New Member
LXJ
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
Quote:
I found there is a problem related to fac::grad() in patch junction. Which I explained here: The problem of bed load transport rate based on FE3.2-famesh. If you have understand how to use it or also in doubt, welcome you to discuss it. Thank you. |
||
Tags |
fam, finite area method, gradient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] Problems with coedge curves and surfaces | tommymoose | ANSYS Meshing & Geometry | 6 | December 1, 2020 12:12 |
[mesh manipulation] Problems with rotational cyclic boundaries | TReviol | OpenFOAM Meshing & Mesh Conversion | 8 | July 11, 2014 04:45 |
[ICEM] Flow channel meshing problems | StefanG | ANSYS Meshing & Geometry | 19 | May 15, 2012 07:44 |
Two-phase air water flow problems by activating Wall Lubrication Force | challenger85 | CFX | 5 | November 5, 2009 06:44 |
Help required to solve Hydraulic related problems | aero | CFX | 0 | October 30, 2006 12:00 |