CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Evaluate phi from a areaVectorField (https://www.cfd-online.com/Forums/openfoam-programming-development/82695-evaluate-phi-areavectorfield.html)

 DiegoNaval December 2, 2010 18:10

Evaluate phi from a areaVectorField

Hi all,
I'm using OF1.5-dev to use the Finite Area Method.
I have evaluate from the Volume velocity U the areaVectorField Us though a volSurfaceMapping vsm(aMesh), in the following way:
Us.internalField() = vsm.mapToSurface(U.boundaryField());
Now I need to find the phi from the Us How I can do that?

Thank to everybody

Diego

 ngj December 3, 2010 05:11

Hi Diego

I suspect you would like to compute the edgeScalarField such as:

edgeScalarField phiS = linearEdgeInterpolate(Us) & aMesh.Le();

Best regards,

Niels

 DiegoNaval December 3, 2010 11:09

Yes exactly.
Thank youvery much Niels

An other question, how does the code compute the Le() function? I don't find the code, is it a vector orthogonal to the edge and contained in the mean plan of the surface mesh evaluate for each edge?

Sorry for the confuse question, but I hope you understand. But I need to understand witch vector Le() gives!

Diego

 ngj December 7, 2010 06:15

Hi Diego

Yes, I understand what you mean. The edge normal is normal to the edge and is tangential to the the curved surface. The computation of the normal is found in

~/OpenFOAM/OpenFOAM-1.5-dev/src/finiteArea/faMesh/faMeshDemandDrivenData.C

in the function void faMesh::calcLe() const

The documentation on the FAM method is rather scarce, however there exist a Ph.D. thesis (in Croatian) [1], however the figures are neat and rather self-explanatory. Look for chapter 5, pp. 137-156. I have also given the bib-file as I understand it to be written, if any comments on that, please do not hesitate to correct me.

Best regards,

Niels

[1]: http://powerlab.fsb.hr/ped/kturbo/Op...vicPhD2005.pdf

[Bib]:
Code:

```@phdthesis{tukovic2005, Author = {Tukovi\'{c}, {\v{Z}}}, Title = {{Metoda Kontrolnih Volumena Na Domenama Promjenjivog Oblika (Finite Volume Method on Domains of Variable Shape)}}, School = {University of Zagreb}, Year = {2005}, Note = {(In Croatian)}, }```

 DiegoNaval December 7, 2010 11:23

Thank you very much, I have a lot of problem with the Croatian language but I have understand the meaning. An other problem.
I have create a mesh with Star and I have convert it with ccm26ToFoam. All seams good, if I use a normal fvSolver the solution have no problem. But in some case, not always if I change some parameters that change very few the mesh generated, the faSolver don't works. I particular I have an Floating point exception on all the part that use the something about the surface mesh. For example when I compute the edge phi for the areaVelocity and use:
edgeScalarField phiS = linearEdgeInterpolate(Us) & aMesh.Le();
In the run I have the error.

Have you any idea on which could be the problem?

Diego

 ngj December 8, 2010 06:11

I have not had any problems using faMesh, but if I have changed the mesh and have forgotten to do makeFaMesh, I receive a run-time error. It is the only explanation I can think of.

Best regards and good luck

Niels

 frederik February 11, 2015 14:03

Correcting phiS

Dear Fomers,

i do also want to solve the Exner-equation. Since i obtain some spirious oscillations i want to smooth the flux phiS.

Therefore i will use a additional diffusion term which is dependant on the cells slope.

(see the following paper:FORTUNATO, A.B. and OLIVEIRA, A., 2007. Improving the Stability of a Morphodynamic Modeling System.
Journal of Coastal Research, SI 50 (Proceedings of the 9th International Coastal Symposium), 486 – 490. Gold Coast, Australia, ISSN 0749.0208)

I want to implement a loop over all edges. To clarify which two cells are owner and neighbour of which edge.

All i need is the name of the List, where the edges are stored.
I hope you can get my point.

Something like an edgeList,

Best regards
frederik

 All times are GMT -4. The time now is 03:33.