CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   I cannot find the route from fvmdivphi gamma to Gamma201 scheme (https://www.cfd-online.com/Forums/openfoam-solving/60574-i-cannot-find-route-fvmdivphi-gamma-gamma201-scheme.html)

luckyluke June 17, 2005 11:12

I want to make it clear how on
 
I want to make it clear how one certain scheme (e.g. Gamma201) is called by "div(phi, gamma)".

I got the route as following:
<1>fvm::div(phi, gamma)
<2>.fv::convectionScheme<type>::New
(
vf.mesh(),
flux,
vf.mesh().divScheme(name)
)().fvmDiv(flux, vf)
<3>.return cstrIter()(mesh, faceFlux, schemeData)
I cannot understand the '()' operator in step <2> and step <3>. And the member function "fvmDiv(~~)" of convectionScheme class is a virtual one. I am confused.

Jasak,weller, or anyone else, please give me a detailed explanation for my stupid question?

By the way, what should I do if I want use a new scheme in my solver?

mattijs June 17, 2005 15:58

1. looks up the scheme to be u
 
1. looks up the scheme to be used from your fvSchemes dictionary
2. instantiates a scheme with this name

Then fvmDiv uses this scheme to do the discretisation.

Have a look at e.g. linearUpwind.H and .C

Just create a copy of those files and rename them and replace all 'linearUpwind' with your scheme's name. Compile & link in the .C file and you will have your new discretisation scheme.


All times are GMT -4. The time now is 13:57.