CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   A few simple questions about linearUpwind and limitedLinear (https://www.cfd-online.com/Forums/openfoam/92898-few-simple-questions-about-linearupwind-limitedlinear.html)

chegdan September 28, 2011 13:58

A few simple questions about linearUpwind and limitedLinear
 
I am a writing about the schemes that I used in my simulations in my thesis and could use some clarification on the linearUpwind and limitedLinear schemes. I have read http://www.cfd-online.com/Forums/ope...r-schemes.html and Alberto did a good explanation, but I need a little more clarification.

linearUpwind:

I know linearUpwind is second order and bounded by a limiter (e.g. cellMDLimited from http://www.cfd-online.com/Forums/ope...lllimited.html). This is different than the limiters used in limitedLinear. In Fluent documentation, the definition of second order upwind is given as:

\phi_f = \phi + \nabla\phi\cdot\vec{r}

where \phi_f and \phi are the face value of phi and the cell centered values of phi in the upstream cells respectively. I am reading through the code of linearUpwind and I see:

Code:

    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr();

    const surfaceScalarField& faceFlux = this->faceFlux_;

    const labelList& owner = mesh.owner();
    const labelList& neighbour = mesh.neighbour();

    const volVectorField& C = mesh.C();
    const surfaceVectorField& Cf = mesh.Cf();

    GeometricField
        <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
        gradVf = gradScheme_().grad(vf);

    forAll(faceFlux, facei)
    {
        if (faceFlux[facei] > 0)
        {
            label own = owner[facei];
            sfCorr[facei] = (Cf[facei] - C[own]) & gradVf[own];
        }
        else
        {
            label nei = neighbour[facei];
            sfCorr[facei] = (Cf[facei] - C[nei]) & gradVf[nei];
        }
    }

I see the mesh.C and mesh.Cf and I am led to believe that through quickly reading the code, these are the cell centroid and face centroid, thus producing an r vector that is dotted with the gradient between the owner and neighbor cells (&gradVf) controlled by gradSchemes. I then see some similar code to take care of the boundaries.

When is the sfCorr used to correct the value of the face? I guess I am just interested in generating a discussion and confirming or clarifying my thoughts.

limitedLinear
This again is second order and is bounded using a sweby limiter (http://www.cfd-online.com/Forums/ope...r-schemes.html post 16). I am just a little fuzzy on what the final simplified form of the equation is for limitedLinear (I admit I haven't looked at it as much as linearUpwind). I am out of my office and will look through Richard Pletcher, John Tannehill and Dale Anderson when I get a chance. Laslty, correct me if I'm wrong but the parameter following a definition of a limitedLinear declaration is passed to the limiter, where 1 uses the limiter and 0 does not (with anything in between being a blend).

Sorry for the massive post, and any clarification would be fantastic and if I find an answer, I will post the result here. And for those interested on how I did the math in the forum, look at (http://www.cfd-online.com/Forums/sit...ne-forums.html)

Dan

chegdan September 28, 2011 19:05

on the limitedLinear, it seems that my knowledge of limiters is lacking and it may turn out to be a simple answer. Looking in Dr. Jasak's thesis (pg 98), I found that:

\phi_f = (\phi_f)_{UD} + \Psi(r)\left[(\phi_f)_{HO}-(\phi_f)_{UD}\right]

where (\phi_f)_{HO} is the value of phi at the face for a higher order scheme. For limitedLinear, it is just the central difference scheme as the "HO" and the limiter (\Psi(r)) is a Sweby limiter (http://www.cfd-online.com/Forums/ope...ar-scheme.html). if there is more to add here or there are corrections then please do.

Dan

caramelo September 29, 2011 04:48

Yes you are right. limitedLinear is using the Sweby limiter [1]. If you want further information about TVD Schemes and different limiters, I think [2] might be interesting to get a first brief impression.

About linearUpwind I don't know much. Till now I just thought it is something like linear upwind differencing but reading your post seems like its only half the story.

[1] P.K. Sweby. High resolution schemes using flux limiters for hyperbolic conservation laws.SIAM Journal on Numerical Analysis, (Vol. 21):pp. 995–1011, 1984.
[2] H. K. Versteeg and W. Malalasekera. An Introduction to Computational Fluid Dynamics: The Finite Volume Method. Pearson, 2007.

chegdan September 29, 2011 14:37

@caramelo : I found a mistake in my first post concerning the linearUpwind definition and just corrected it (sorry about that). I did have a chance to look at the Sweby paper and also a few other sources on TVD schemes, very interesting. Thanks for the sources.

I see throughout the forum that the linearUpwind is bounded, but Ferziger and Peric' note that second order upwind is unbounded.

My question is that if one uses Gauss linear as a grad scheme for linearUpwind, will this approach the traditional second order upwind and therefore unbounded?

Also, is Gauss linear just the arithmetic average of the two cells or is it the distance weighted average similar to the linear divScheme for advection?

Lastly, is the linearUpwind scheme only bounded if limited versions of the gradient scheme are used, i.e. limited linear, cellLimited, faceMDLimited etc.?

Dan

chegdan October 1, 2011 15:51

[Solved] A few simple questions about linearUpwind and limitedLinear
 
Quote:

Originally Posted by chegdan (Post 326116)
@caramelo : I found a mistake in my first post concerning the linearUpwind definition and just corrected it (sorry about that). I did have a chance to look at the Sweby paper and also a few other sources on TVD schemes, very interesting. Thanks for the sources.

I see throughout the forum that the linearUpwind is bounded, but Ferziger and Peric' note that second order upwind is unbounded.

My question is that if one uses Gauss linear as a grad scheme for linearUpwind, will this approach the traditional second order upwind and therefore unbounded?

Also, is Gauss linear just the arithmetic average of the two cells or is it the distance weighted average similar to the linear divScheme for advection?

Lastly, is the linearUpwind scheme only bounded if limited versions of the gradient scheme are used, i.e. limited linear, cellLimited, faceMDLimited etc.?

Dan

Sometimes I think I need to put the hash tag #dumbquestion or #thinking_out_loud on my comments to let everyone know that I'm thinking out loud about something. For my question:

Quote:

Also, is Gauss linear just the arithmetic average of the two cells or is it the distance weighted average similar to the linear divScheme for advection
The answer to that one is that it is the regular Gauss linear interpolation scheme that we use all the time.

In the end I think that I have the answer that I was looking for.

Dan

florian_krause October 3, 2011 03:45

Hi Dan,

Quote:

When is the sfCorr used to correct the value of the face? I guess I am just interested in generating a discussion and confirming or clarifying my thoughts
did you find an answer to this? I also had a look at the source and couldn't find the part where the pieces are put together, namely cell centered phi and gradient of phi.

Apart from this, as far as I understand, linearUpwind scheme is unbounded as long as you don't specify one of the limiters cellLimited, faceLimited etc.

Best,
Florian

chegdan October 3, 2011 12:55

Quote:

When is the sfCorr used to correct the value of the face? I guess I am just interested in generating a discussion and confirming or clarifying my thoughts
From what I can see in the Doxygen information for the limitedSurfaceInterpolationScheme class, everything is pieced together there. linearUpwind returns the weighting factors and then its all put together nicely by the limitedSurfaceInterpolationScheme class.

and of course:
Quote:

Apart from this, as far as I understand, linearUpwind scheme is unbounded as long as you don't specify one of the limiters cellLimited, faceLimited etc
This is what I have found as well...so far. Thanks for the reply and if anyone has a correction, please respond.

Dan

yhy20081016 October 18, 2013 23:49

How can you find out which file contains the source code implementing the 'linearUpwi
 
Quote:

Originally Posted by chegdan (Post 325960)
I am a writing about the schemes that I used in my simulations in my thesis and could use some clarification on the linearUpwind and limitedLinear schemes. I have read http://www.cfd-online.com/Forums/ope...r-schemes.html and Alberto did a good explanation, but I need a little more clarification.

linearUpwind:

I know linearUpwind is second order and bounded by a limiter (e.g. cellMDLimited from http://www.cfd-online.com/Forums/ope...lllimited.html). This is different than the limiters used in limitedLinear. In Fluent documentation, the definition of second order upwind is given as:

\phi_f = \phi + \nabla\phi\cdot\vec{r}

where \phi_f and \phi are the face value of phi and the cell centered values of phi in the upstream cells respectively. I am reading through the code of linearUpwind and I see:

Code:

    GeometricField<Type, fvsPatchField, surfaceMesh>& sfCorr = tsfCorr();

    const surfaceScalarField& faceFlux = this->faceFlux_;

    const labelList& owner = mesh.owner();
    const labelList& neighbour = mesh.neighbour();

    const volVectorField& C = mesh.C();
    const surfaceVectorField& Cf = mesh.Cf();

    GeometricField
        <typename outerProduct<vector, Type>::type, fvPatchField, volMesh>
        gradVf = gradScheme_().grad(vf);

    forAll(faceFlux, facei)
    {
        if (faceFlux[facei] > 0)
        {
            label own = owner[facei];
            sfCorr[facei] = (Cf[facei] - C[own]) & gradVf[own];
        }
        else
        {
            label nei = neighbour[facei];
            sfCorr[facei] = (Cf[facei] - C[nei]) & gradVf[nei];
        }
    }

I see the mesh.C and mesh.Cf and I am led to believe that through quickly reading the code, these are the cell centroid and face centroid, thus producing an r vector that is dotted with the gradient between the owner and neighbor cells (&gradVf) controlled by gradSchemes. I then see some similar code to take care of the boundaries.

When is the sfCorr used to correct the value of the face? I guess I am just interested in generating a discussion and confirming or clarifying my thoughts.

limitedLinear
This again is second order and is bounded using a sweby limiter (http://www.cfd-online.com/Forums/ope...r-schemes.html post 16). I am just a little fuzzy on what the final simplified form of the equation is for limitedLinear (I admit I haven't looked at it as much as linearUpwind). I am out of my office and will look through Richard Pletcher, John Tannehill and Dale Anderson when I get a chance. Laslty, correct me if I'm wrong but the parameter following a definition of a limitedLinear declaration is passed to the limiter, where 1 uses the limiter and 0 does not (with anything in between being a blend).

Sorry for the massive post, and any clarification would be fantastic and if I find an answer, I will post the result here. And for those interested on how I did the math in the forum, look at (http://www.cfd-online.com/Forums/sit...ne-forums.html)

Dan

How can you find out which file contains the source code implementing the 'linearUpwind' scheme? Please teach me. Thank you very much.

chegdan October 21, 2013 09:57

Linux commands to search for file names and within files are your friend. To look for the linearUpwind source, try

Code:

cd $FOAM_SRC
grep -R 'linearUpwind' .

and then look for references to linearUpwind (you will see many). From that you can go through source code files. If you already know the name of the source file (in this case its easy since we want linearUpwind.C or linearUpwind.H), you can do a

Code:

cd $FOAM_SRC
find . -name 'linearUpwind.C'

and that will tell you where a specific file lives. After a while you will learn where different source code resides and be able to find things without searching like this. Good luck.

yhy20081016 October 26, 2013 22:44

Thank you very much.

Anne Lincke January 10, 2014 17:51

Quote:

Originally Posted by chegdan (Post 325960)
I am a writing about the schemes that I used in my simulations in my thesis and could use some clarification on the linearUpwind and limitedLinear schemes. I have read http://www.cfd-online.com/Forums/ope...r-schemes.html and Alberto did a good explanation, but I need a little more clarification.

linearUpwind:

I know linearUpwind is second order and bounded by a limiter (e.g. cellMDLimited from http://www.cfd-online.com/Forums/ope...lllimited.html). This is different than the limiters used in limitedLinear. In Fluent documentation, the definition of second order upwind is given as:

\phi_f = \phi + \nabla\phi\cdot\vec{r}

where \phi_f and \phi are the face value of phi and the cell centered values of phi in the upstream cells respectively.

Dear Dan, Dear Foamers,

I found your post which is very interesting for me.
Could you please tell me how one can derive the equation above?
I found this equation implemented in OpenFOAM, and in Fluent it is obviously the same.
But I have problems in understanding this equation.
For LUDS (linear upwind) we discretize the face value as

\phi_f = \phi(C) + 0.5 (\phi(C) - \phi(U))

How is the implemented formula connected to that?

Thank you very much for an answer in advance!

Anne

Bazinga April 10, 2015 03:47

Quote:

Originally Posted by Anne Lincke (Post 469529)
Dear Dan, Dear Foamers,

I found your post which is very interesting for me.
Could you please tell me how one can derive the equation above?
I found this equation implemented in OpenFOAM, and in Fluent it is obviously the same.
But I have problems in understanding this equation.
For LUDS (linear upwind) we discretize the face value as

\phi_f = \phi(C) + 0.5 (\phi(C) - \phi(U))

How is the implemented formula connected to that?

Thank you very much for an answer in advance!

Anne

I am a bit late to the discussion but I am studying interpolation schemes a bit and I think I can answer your question. I am still fairly new to the topic so there might be an error so feel free to correct me.

Taylor Expansion around P gives you this formula:
\phi(x_e)=\phi(x_P)+\left ( x_e-x_P \right )\left(\frac{\partial \phi}{\partial x} \right)_P+\frac{\left ( x_e-x_P \right )^2}{2!}\left(\frac{\partial^2 \phi}{\partial x^2}  \right)_P+ \cdots+h.o.t

Now for upwind the flux over the east surface of a 2D CV for a flow from west:

\phi(x_e)=\phi(x_P)

The rest of the equation is the truncation error, thus first order.
If you also calculate the first truncated term your scheme will become second order and you will get this expression for your flux over face e:

\phi(x_e)=\phi(x_P)+\left ( x_e-x_P \right )\left(\frac{\partial \phi}{\partial x} \right)_P

CDS for the gradient gives:

\left(\frac{\partial \phi}{\partial x} \right)_P=\frac{\phi(x_E)-\phi(x_P)}{(x_E-x_P)}

For 2\left ( x_e-x_P \right ) =  (x_E-x_P)

You get:
\phi(x_e)=\phi(x_P)+\frac{\phi(x_E)-\phi(x_P)}{2}

That equals your expression:

\phi_f = \phi(C) + 0.5 (\phi(C) - \phi(U))

Hope that helps :)

Anne Lincke April 10, 2015 04:54

Thank you very much for your answer! Meanwhile I have also been able to understand the formula, but it is nice to see the answer here as well.

Have a nice day!

Anne

davibarreira October 10, 2015 11:52

Isnt the correct way like this?:

\phi_f=\phi(U)+\psi(\phi(C)-\phi(U))

Such that, if \psi=1:
\phi_f=\phi(C)

If \psi=0:
\phi_f=\phi(U)

And if \psi=0, we get the Linear Upwind Differencing (LUD):

\phi_f=\phi(U)+0.5(\phi(C)-\phi(U))

Bazinga October 11, 2015 02:29

Quote:

Originally Posted by davibarreira (Post 567466)
Isnt the correct way like this?:

\phi_f=\phi(U)+\psi(\phi(C)-\phi(U))

Such that, if \psi=1:
\phi_f=\phi(C)

If \psi=0:
\phi_f=\phi(U)

And if \psi=0, we get the Linear Upwind Differencing (LUD):

\phi_f=\phi(U)+0.5(\phi(C)-\phi(U))

Just looked through it briefly. I think you are right. Thanks. The last part of my last reply should be:

"\phi_f = \phi(U) + 0.5 (\phi(C) - \phi(U)) which does not equal the proposed equations."

davibarreira October 11, 2015 10:17

One thing got me confused though, in the OpenFOAM website (http://cfd.direct/openfoam/user-guide/fvschemes/), it's written "Some TVD/NVD schemes require a coefficient ψ,0 ≤ ψ ≤ 1 where ψ = 1 corresponds to TVD conformance, usually giving best convergence and ψ = 0 corresponds to best accuracy. Running with ψ = 1 is generally recommended."
So this implies that using ψ = 0 would give the higher order scheme (central difference), which is the opposite stated in dr. Jasak's thesis.

I created a new thread with some more questions related to the topic.
http://www.cfd-online.com/Forums/ope...tedlinear.html
Any thoughts?

Anne Lincke October 13, 2015 03:59

Dear Bazinga and Davi,

I try to derive the implemented formula once again:
Two cell centers in upwind flow direction (u_C and u_U) are taken into account. The Taylor series leads to the approximation of u at cells U and C and, subsequently, at face f

u_C= u_f - u_f' \frac d 2 + u_f'' \frac {d^2}{8} - \cdots
u_U= u_f - u_f'\frac{3d}2 + u_f'' \frac{d^2 9 }{8} - \cdots
u_f= \frac{ 3 u_C - u_U} {2} - HOT,

where d denotes the distance from C to U.
The first order upwind approximation is numerically very stable, as the upwind term stabilizes the diagonal of the matrix.
Therefore, we use the implicit term of an upwind discretization as a matrix coefficient
and add the remaining terms as explicit correction terms on the right-hand side of the equation system.
The numerical approximation for the LUDS discretization thus transforms to

u_f = u_C + \frac {u_C - u_U}{2}

The second term is the explicit correction term.
This equals the implemented formula.

alimea January 12, 2018 04:08

Quote:

Originally Posted by Anne Lincke (Post 567878)
Dear Bazinga and Davi,

I try to derive the implemented formula once again:
Two cell centers in upwind flow direction (u_C and u_U) are taken into account. The Taylor series leads to the approximation of u at cells U and C and, subsequently, at face f

u_C= u_f - u_f' \frac d 2 + u_f'' \frac {d^2}{8} - \cdots
u_U= u_f - u_f'\frac{3d}2 + u_f'' \frac{d^2 9 }{8} - \cdots
u_f= \frac{ 3 u_C - u_U} {2} - HOT,

where d denotes the distance from C to U.
The first order upwind approximation is numerically very stable, as the upwind term stabilizes the diagonal of the matrix.
Therefore, we use the implicit term of an upwind discretization as a matrix coefficient
and add the remaining terms as explicit correction terms on the right-hand side of the equation system.
The numerical approximation for the LUDS discretization thus transforms to

u_f = u_C + \frac {u_C - u_U}{2}

The second term is the explicit correction term.
This equals the implemented formula.


Yes, I think what you have written is correct. Because Bazinga mentioned that:

CDS for the gradient gives:

\left(\frac{\partial \phi}{\partial x} \right)_P=\frac{\phi(x_E)-\phi(x_P)}{(x_E-x_P)}

However, this isn't CDS, that was upwind. Also he/she used downwind point (E) for upwind scheme. so I think that was wrong

makaveli_lcf May 8, 2018 06:04

Hi guys!

I am making currently some testing with limitedLinear(V) schemes, and I totally see no difference between limiter 0..1!

I would expect with limitedLinear 0 to act as linear divergence scheme,am I write?
But the results are totally different from "Gauss linear" scheme.

I would really appreciate your feedback on this topic.

Cheers,
Alex

alimea May 8, 2018 07:00

Quote:

Originally Posted by makaveli_lcf (Post 691598)
Hi guys!

I am making currently some testing with limitedLinear(V) schemes, and I totally see no difference between limiter 0..1!

I would expect with limitedLinear 0 to act as linear divergence scheme,am I write?
But the results are totally different from "Gauss linear" scheme.

I would really appreciate your feedback on this topic.

Cheers,
Alex



Hi Alexander

I haven't tested this, but theoretically yes. you are right. According to this sentence of cfd.direct:
limitedLinear: linear scheme that limits towards upwind in regions of rapidly changing gradient; requires a coefficient, where 1 is strongest limiting, tending towards linear as the coefficient tends to 0.


https://cfd.direct/openfoam/user-guide/fvschemes/

makaveli_lcf May 8, 2018 07:22

So I am currently busy but if no ready unswer will come, I have to look into the code :confused:

Quote:

Originally Posted by alimea (Post 691605)
Hi Alexander

I haven't tested this, but theoretically yes. you are right. According to this sentence of cfd.direct:
limitedLinear: linear scheme that limits towards upwind in regions of rapidly changing gradient; requires a coefficient, where 1 is strongest limiting, tending towards linear as the coefficient tends to 0.


https://cfd.direct/openfoam/user-guide/fvschemes/


s.v June 15, 2021 19:13

Sorry I have not read everything in this thread carefully but my PhD thesis (which can be downloaded from this link -- https://drum.lib.umd.edu/handle/1903/21883) discusses both these schemes reasonably well I think -- see information around page 27 in my thesis for linearUpwind and information around pages 34-35 for limitedLinear ....

Some other schemes are also reasonably well discussed in there (for example LUST, Gamma) ....

Most of the schemes are discussed through the NVD diagram which provides some useful insights ....

Convergence speed for different schemes is also discussed a little bit in there ....

Cheers ....

DevilX June 17, 2021 02:57

Just a small question: in your thesis you use fx in eq. 2.23 - is it the gradient in x direction or what is ist? Thanks!

s.v June 17, 2021 07:33

Hello Daniel -- fx is described in the LUST scheme section (page 28, text below equation 2.15) -- I have pasted some of that text below:

"f x represents the mesh non-uniformity in the direction of the vector r. For
uniform grids (for which f x = 1/2)"

Tobi June 21, 2021 08:27

Quote:

Originally Posted by makaveli_lcf (Post 691608)
So I am currently busy but if no ready unswer will come, I have to look into the code :confused:

Dear Dr. Vakhrushev,

did you investigate into that topic and did you get a reasonable answer? I was expecting more or less the same result as you wrote. Using a limiter of 0 should be identical to linear.

s.v June 21, 2021 08:47

Hi Tobias:

I am guessing the reason why "linear" and "limitedLinear 0" do not give identical results is because "limitedLinear 0" becomes upwind outside the Convection Boundedness Criterion (CBC) region on the NVD diagram -- see for example the discussion and figures around page 35 in my thesis (https://drum.lib.umd.edu/handle/1903/21883) ....

This thread (https://www.cfd-online.com/Forums/op...tml#post805421) also discusses the same issue and I wrote a similar answer there as well (see post #23) ....

I hope this helps ....

Tobi June 21, 2021 10:17

I am not too much into the single discretization schemes and its pro/cons. I would need to investigate into the OpenFOAM code to understand the real difference. However, if you say some parts go to upwind rather than linear, it should be obvious.

You thesis already had more downloads than mine will get until 2200 :)
Well. Regarding to your thesis, k represents the limiter, right? So k = 0 is a "bounded linear (central differencing)" scheme. However, I need some time to go through the stuff (whenever I will find the motivation :P )

s.v June 21, 2021 10:39

When I did my thesis -- I looked at the code and wrote the equations for the different schemes ....

To confirm that I am reading the code correctly I remember I wrote a small OpenFOAM utility that gave me the face values directly ....

Then I compared the face values given by the equations and the OpenFOAM utility with a simple python or Matlab script -- they were within machine precision as far as I remember -- so I am quite confident about the equations given in my thesis ....

And yes k is the limiter/coefficient and can go from 0 to 1 ....

bany March 30, 2024 02:44

Quote:

Originally Posted by Anne Lincke (Post 469529)
Dear Dan, Dear Foamers,

I found your post which is very interesting for me.
Could you please tell me how one can derive the equation above?
I found this equation implemented in OpenFOAM, and in Fluent it is obviously the same.
But I have problems in understanding this equation.
For LUDS (linear upwind) we discretize the face value as

\phi_f = \phi(C) + 0.5 (\phi(C) - \phi(U))

How is the implemented formula connected to that?

Thank you very much for an answer in advance!

Anne


In OpenFOAM, limitedLinear: T_f =psiT_{UD} +(1-psi)T_{CD}
linearUpwind: T_{f} =T_{P}+\phi grad(T)_{p}r

When I output the matrix created by fvm::div(phi, T) through fvScalarMatrix divphi_tmp(fvm::div(phi, T));, I found that the values of divphi_tmp.diag(), divphi_tmp.lower(). divphi_tmp.upper() are identifical no matter which schemes (i.e., upwind and linearUpwind) are used in fvSchemes, expect for divphi_tmp.source().

Where, \phi is a limiter, grad(T)_{p} is the gradient of T at the cell centroid P. How to calculate the grad(T) at the centroid? OpenFOAM will search the gradScheme in fvSchemes. For the Gauss linear scheme, grad(T) is computed by the sum of the product of T_{f} (i.e., T at faces around the cell P), direction vector and area respectively in the x, y, z directions, as explained in https://www.youtube.com/watch?v=oeA1Bg9GqQQ. So the contribution of fvm::div(phi, T), when using linearUpwind, enters TEqn.source() from the grad(T)_{p}.

So, the grad(T) is computed by T_{f}, and the grad(T) in the linearUpwind scheme contributes the divphi_tmp.source(). If grad(T) is computed by (T_{P}-T_{N})/d like \phi_f = \phi(C) + 0.5 (\phi(C) - \phi(U)), the contribution of fvm::div(phi, T) will affect divphi_tmp.lower() and divphi_tmp.upper(), and not affact divphi_tmp.source().


All times are GMT -4. The time now is 20:22.