CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Viscous Flux Jacobian (http://www.cfd-online.com/Forums/main/73338-viscous-flux-jacobian.html)

bearcat March 4, 2010 22:29

Viscous Flux Jacobian
 
Who has the experience computing viscous flux Jacobian for incompressible flow?

Suppose we set the primitive variables as [P, U, V, W].

I know hand calculating the convective flux Jacobian analytically is easy. But for viscous flux, the situation looks different. My own hand derivation shows that it should be zero for Cartesian grid. It may not be zero in the case of curvilinear grid.

Am I correct?

Thank you.

agd March 9, 2010 13:58

The viscous flux Jacobians are not zero for a Cartesian grid.

bearcat March 9, 2010 19:52

Quote:

Originally Posted by agd (Post 249205)
The viscous flux Jacobians are not zero for a Cartesian grid.

Thank you for your reply.

But are you sure? I mean incompressible flow with constant viscosity here.

suppose in 2D case with kinematic viscosity as miu
primitive variable: Q=[ P, U, V ],
convective flux in X: E=[ U, U*U+P, UV ]
viscous flux in X: Ev=[ 0, 2*miu*ddU/ddX, miu*(ddU/ddY+ddV/ddX) ]

When I do the viscous flux Jacobian analytically: dd(Ev)/ddQ, all derivatives of Ev elements in terms of P,U or V get nothing. And someone also remind me the viscous terms are linear for incompressible N-S eq.

agd March 9, 2010 20:53

I am assuming you are trying to develop an implicit algorithm. Since the viscous terms are linear, if you write Q(N+1) = Q(N) + DQ and substitute into the diff. eq., the terms containing the DQ can be carried to the left-hand side. The flux Jacobian (or the contribution to the system matrix) follow from that. In this case it will be mu multiplied by the coefficients of the difference terms.

bearcat March 9, 2010 21:36

Quote:

Originally Posted by agd (Post 249241)
I am assuming you are trying to develop an implicit algorithm. Since the viscous terms are linear, if you write Q(N+1) = Q(N) + DQ and substitute into the diff. eq., the terms containing the DQ can be carried to the left-hand side. The flux Jacobian (or the contribution to the system matrix) follow from that. In this case it will be mu multiplied by the coefficients of the difference terms.



Yes, if we use a Jacobian-free Newton-Krylov method, your idea will be implemented easily. But I think if we can cancel it out analytically, then we don't have to compute it numerically and save some effort.

The original 2D eq is:

ddQ/ddt+dd(E-Ev)/ddX+dd(F-Fv)/ddY=0 (no source term)

The 3x3 Jacobian matrix often acts as a coefficient in system matrix. My opinion is that all elements in viscous flux Jacobian matrix are zero if no coordinate transform is involved.

agd March 9, 2010 22:35

You can ignore them, but the advantage of including them is that they contribute to the diagonal dominance of the coefficient matrix.

peter.zhao March 11, 2010 01:40

This paper maybe is useful for you
 
For compressible flow, the below paper maybe is useful.
"Implicit multigrid solution of the compressible Navier-Stokes equations with application to distributed parallel processing",
Tysinger, Thomas Lee, Ph.D. Thesis Cornell Univ., Ithaca, NY,1992.
This paper introduced the viscous jacobian matrix for compressible NS equation. I think this method is also useful for your problem.

gory March 11, 2010 07:03

not zero
 
[QUOTE=bearcat;249236]
viscous flux in X: Ev=[ 0, 2*miu*ddU/ddX, miu*(ddU/ddY+ddV/ddX) ]
When I do the viscous flux Jacobian analytically: dd(Ev)/ddQ, all derivatives of Ev elements in terms of P,U or V get nothing.

You get something.
For example,

dd(Ev)/ddU = [0, 2*miu*dd/ddX, miu*dd/ddY ]

A discretized version would be

dd(Ev)/ddU = [0, 2*miu*(1/Delta x), miu*(1/Delta y) ]


gory

bearcat March 11, 2010 13:46

Quote:

Originally Posted by peter.zhao (Post 249477)
For compressible flow, the below paper maybe is useful.
"Implicit multigrid solution of the compressible Navier-Stokes equations with application to distributed parallel processing",
Tysinger, Thomas Lee, Ph.D. Thesis Cornell Univ., Ithaca, NY,1992.
This paper introduced the viscous jacobian matrix for compressible NS equation. I think this method is also useful for your problem.

Thank you.

viscous jacobian for compressible flow appears in many CFD books. But that's an easier and completely different case. For incompressible flow we don't have density as a primitive variable.



[QUOTE=gory;249527]
Quote:

Originally Posted by bearcat (Post 249236)
viscous flux in X: Ev=[ 0, 2*miu*ddU/ddX, miu*(ddU/ddY+ddV/ddX) ]
When I do the viscous flux Jacobian analytically: dd(Ev)/ddQ, all derivatives of Ev elements in terms of P,U or V get nothing.

You get something.
For example,

dd(Ev)/ddU = [0, 2*miu*dd/ddX, miu*dd/ddY ]

A discretized version would be

dd(Ev)/ddU = [0, 2*miu*(1/Delta x), miu*(1/Delta y) ]

gory

Thank you for reminding me.You really get the point. At first I think they may look like operators rather than values as Jacobian matrix elements: dd(ddU/ddX)/ddU=dd( )/ddX. Now you tell me dd(ddU/ddX)/ddU=1/ddX=1/deltaX. Can you inform me any reference for this?

agd March 11, 2010 14:20

It's what you'll get if you follow the steps I outlined above - it results from the linear nature of the PDE and the linearization of the aforementioned viscous terms.

gory March 11, 2010 18:14

Jacobians
 
Quote:

Originally Posted by gory (Post 249527)

Thank you for reminding me.You really get the point. At first I think they may look like operators rather than values as Jacobian matrix elements: dd(ddU/ddX)/ddU=dd( )/ddX. Now you tell me dd(ddU/ddX)/ddU=1/ddX=1/deltaX. Can you inform me any reference for this?


I don't know any reference.
I agree with agd that you follow his instruction and you'll get it.

Example:
Consider a simple diffusion equation,
ut = df/dx, where f = du/dx (d = \partial, i.e., one partial).
Then,
ut = A du/dx, where A=df/du=d(du/dx)/du=d/dx.
It is an operator.

If you're interested in the Jacobian (I'm not sure if you are)
of the residual. It's related but a bit different, I think.
I guess it goes like this:

A discretized version of df/dx may be

RHS(j) =(u_{j+1} - 2 u_j + u_{j-1})/(Delta x)^2,

where RHSis a residual vector and RHS(j) is the j-th component.

The Jacobian is a matrix defined as
dRHS/dU where U = [u1, u2, u_{j-1}, u_j, ...],
i.e., the discrete values. So, for example,

(dRHS/U)(j,j) = dRHS(j)/du_j = -2 / (Delta x)^2
(dRHS/U)(j,j-1) = dRHS(j)/du_{j-1}= 1/(Delta x)^2
and so on.

In any case, the Jacobian is not zero for viscous terms, I think.
gory


All times are GMT -4. The time now is 14:38.