CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Problem with Harmonic Interpolation

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2013, 23:52
Default Problem with Harmonic Interpolation
  #1
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
Hi everyone!!

I am solving 3d navier stokes equations, in which I am using first order upwind scheme for interpolation of convective terms. But to interpolate the non-linear part of convective term I am using Harmonic Interpolation. This method of interpolation is not converging the solution. It is converging only when I used arithmetic interpolation to non-linear terms..


So what might be the reason?





Thanks in advance..
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Old   October 17, 2013, 04:57
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,149
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
It's probably me, but:

- what do you mean by non-linear part of the convective term? Is there a linear one too?

- first order upwind is already an interpolation (first order, upwind). Why you need an additional interpolation?
sbaffini is offline   Reply With Quote

Old   October 18, 2013, 08:41
Default
  #3
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
Hi,

When we discretize navier stokes equation, we have two velocity terms in convective term. One of which goes to coefficients and other is considered as unknown. The value of velocity term which goes to coefficients is taken from the previous iteration. This term is what I am referring as non-linear velocity term. This non-linear velocity term is again in terms of facial value. Hence to find its value from previous iteration, it has to be interpolated to cell center values. This interpolation is what I am referring to, and not the interpolation of unknown velocity terms for which I have used first order upwind.


Rho * u * v = If this is the convective term, u represents non-linear velocity term who's value is taken from previous iteration and v represents unknown velocity term which is to be found from present iteration.


Thanks..
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Old   October 18, 2013, 10:15
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,149
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Hi suhas,

now it is clear. However, consider the following:

- usually it is not just the velocity which is used from the previous iteration, but the overall mass flux rho * u_n, with u_n the component of the velocity normal to a face (as i understand you are talking about the finite volume method)

- according to the specific formulation (compressible/incompressible) you might or might not need a specific interpolation. For example, this flux always has to satisfy the continuity constraint. In some cases, this would require the use of a pressure term too in the interpolation, according to the specific pressure-velocity coupling method.

- in any case, i don't know of any approach using the harmonic interpolation for such term

- finally, you don't usually interpolate from faces to cell centers but quite the opposite. Indeed, in FV methods every cell centered variable is updated only in terms of facial fluxes. Of course, i'm talking about the standard FV method. I don't know if there is some specific approach that doesn't need that.
sbaffini is offline   Reply With Quote

Old   October 18, 2013, 16:35
Default
  #5
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
Hi Paolo,

Thank you for the reply.

But I still have a doubt. Lets say, this is the FV discretized, V momentum equation on staggered Cartesian grid.


" A_n*V_n = A_nE*V_nE + A_nW*V_nW + A_nn*V_nn + A_s*V_s + A_nT*V_nT + A_nB*V_nB + (P_P - P_N)*dx*dz + constant. "



If P, N, E, W, T, B, S are pressure cell centers. V velocities are solved at n, nn, nE, nW, nT, nB, s because V velocity is staggered along y coordinate.


Here let's take one of the coefficients "A_nn" as an example from equation , where


" A_nn = D_N + [[ -F_N , 0 ]]. " (This term appears due to upwind scheme )


Here "D_N" is diffusion coefficient at N and "F_N" is convective flux at N.

and

" F_N = rho*V_N*dx*dz. "

Here the value of V velocity at N is from previous iteration. But value of V at N is not known directly as it is staggered to nn position. Hence "V_N" has to be interpolated from values at "n" and "nn" which are the staggered cell centers of V velocities. So the interpolation used here is what I was actually referring to.


Thanks.
Attached Images
File Type: png Untitled.png (8.4 KB, 4 views)
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Old   October 18, 2013, 17:28
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,149
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Dear Suhas,

my bad, i should have understood that you were talking about a staggered approach. I used it for FD only and never for the FV (as it is very cumbersome indeed). Hence, i know nothing about the interpolation for the convective flux. Now i understand the reason for the harmonic interpolation.
The only thing i can think of is, does your code work for a uniform grid?
sbaffini is offline   Reply With Quote

Old   October 18, 2013, 17:59
Default
  #7
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
Hi Paolo,


My code works fine when I use arithmetic Interpolation everywhere as I mentioned above. But crashes when I use harmonic Interpolation. But H.I was supposed to improve results according to Patankar.

I have tried only staggered grid.. What do you mean by uniform grid ? Is it colloquial one? If it is this, then I have not tried colloquial grid which requires Rhie Chow interpolation..
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Old   October 19, 2013, 07:01
Default
  #8
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,149
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I meant a grid with uniform spacing in all the directions.

However, could you explain how is harmonic interpolation performed for the following two cases (let's take figure 6.8 on page 122 of Patankar's book as a reference):

- V_N for the V equation

- U_ne for the V equation
sbaffini is offline   Reply With Quote

Old   October 19, 2013, 09:57
Default
  #9
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
The code is not working for both uniform and non uniform grids with H.I.


We know the values of V_n, V_nn, U_e, U_Ne (Staggered Cell centers) from previous iteration.

So,
harmonic Interpolation
V_N = 2 * (V_n * V_nn)/(V_n + V_nn).
U_ne = 2 * (U_e * U_Ne)/(U_e + U_Ne).

Arithmetic interpolation
V_N = (V_n + V_nn)/2.
U_ne = (U_e + U_Ne)/2.
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Old   October 19, 2013, 10:29
Default
  #10
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,149
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
I have to admit that this is the first time i see this kind of interpolation (Harmonic). I don't know if it is specific for staggered FV methods, but it looks weird to me. Do you have a reference for this? Which page in the Patankar book?

It is common for diffusion coefficients (in colocated arrangement, at least) but i've never seen it for the velocity (or mass flux).
sbaffini is offline   Reply With Quote

Old   October 19, 2013, 13:47
Default
  #11
New Member
 
suhas jain suresh
Join Date: Aug 2012
Location: Stanford, USA
Posts: 27
Rep Power: 13
suhas jain is on a distinguished road
I got it now..actually I was wrong.

In patankar, Harmonic Interpolation is explained only for diffusion coefficients and I think it mostly applies only to that. I had assumed that it works for velocity also. So was stuck in above problem.

Now I understand that applying Harmonic interpolation to velocity is actually absurd.
__________________
Suhas Jain
Graduate student, Stanford University
suhas.jain2000@gmail.com
suhas jain is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
area does not match neighbour by ... % -- possible face ordering problem St.Pacholak OpenFOAM 10 February 7, 2024 22:50
conduction problem venkataramana OpenFOAM 3 December 1, 2013 08:30
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 20:42
Value below interpolation range Clif CFX 0 December 19, 2010 10:53
Interpolation problem! Severin FLUENT 1 July 28, 2006 07:10


All times are GMT -4. The time now is 01:50.