# Viscous Flux Jacobian

 Register Blogs Members List Search Today's Posts Mark Forums Read

 March 4, 2010, 22:29 Viscous Flux Jacobian #1 Member   bearcat Join Date: Jul 2009 Location: Ohio Posts: 35 Rep Power: 10 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.

 March 9, 2010, 13:58 #2 Senior Member   Join Date: Jul 2009 Posts: 247 Rep Power: 12 The viscous flux Jacobians are not zero for a Cartesian grid.

March 9, 2010, 19:52
#3
Member

bearcat
Join Date: Jul 2009
Location: Ohio
Posts: 35
Rep Power: 10
Quote:
 Originally Posted by agd The viscous flux Jacobians are not zero for a Cartesian grid.

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.

Last edited by bearcat; March 9, 2010 at 21:23.

 March 9, 2010, 20:53 #4 Senior Member   Join Date: Jul 2009 Posts: 247 Rep Power: 12 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.

March 9, 2010, 21:36
#5
Member

bearcat
Join Date: Jul 2009
Location: Ohio
Posts: 35
Rep Power: 10
Quote:
 Originally Posted by agd 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.

 March 9, 2010, 22:35 #6 Senior Member   Join Date: Jul 2009 Posts: 247 Rep Power: 12 You can ignore them, but the advantage of including them is that they contribute to the diagonal dominance of the coefficient matrix.

 March 11, 2010, 01:40 This paper maybe is useful for you #7 New Member   peter. zhao Join Date: Dec 2009 Location: China Posts: 4 Rep Power: 9 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.

 March 11, 2010, 07:03 not zero #8 Member   Join Date: Mar 2009 Posts: 33 Rep Power: 10 [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

March 11, 2010, 13:46
#9
Member

bearcat
Join Date: Jul 2009
Location: Ohio
Posts: 35
Rep Power: 10
Quote:
 Originally Posted by peter.zhao 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 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?

Last edited by bearcat; March 11, 2010 at 14:08.

 March 11, 2010, 14:20 #10 Senior Member   Join Date: Jul 2009 Posts: 247 Rep Power: 12 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.

March 11, 2010, 18:14
Jacobians
#11
Member

Join Date: Mar 2009
Posts: 33
Rep Power: 10
Quote:
 Originally Posted by 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?

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

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Jackson Main CFD Forum 2 July 29, 2010 10:57 mecheng1600 Main CFD Forum 0 December 5, 2009 21:07 JG Main CFD Forum 2 January 9, 2008 16:29 Andy Main CFD Forum 8 February 26, 2004 00:53 Andy Main CFD Forum 0 February 19, 2004 14:59

All times are GMT -4. The time now is 18:21.