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

Source term linearization

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2010, 07:40
Default Source term linearization
  #1
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 17
lost.identity is on a distinguished road
Hi,

I'm trying to linearize a source term in my momentum equations written in spherical coordinates. I'm trying to solve a 1-D problem.

The source term is given by

\frac{\partial}{\partial{r}}(r\Gamma{u})

where \Gamma is the diffusivity for example, r is the radial coordinate and {u} is the velocity in the r-direction.

Using Finite Volume discretization what I've tried to do is integrate this over the control volume to get

\int_w^e \frac{\partial}{\partial{r}}(r\Gamma{u})\, dr =(r\Gamma{u})_e-(r\Gamma{u})_w

where e and w are the faces of the control volume. The usual source term linearization, for example, by Patankar (1980) is S=S_c+S_P{u_P}.

The problem I have is that the source term linearization above has the term {u_P}, which is the value of {u} at the centre of the control volume (i.e. at grid point P) but from my control volume integration I get the values {u_e} and u_w which are the face values. I know that I can evaluate the face values in terms of the centre coordinates but then this makes things a lot more complicated.
lost.identity is offline   Reply With Quote

Old   April 27, 2010, 01:03
Default
  #2
Senior Member
 
Hamid Zoka
Join Date: Nov 2009
Posts: 282
Rep Power: 18
Hamidzoka is on a distinguished road
hi,
"Up" does not necessarily equal to "U" in position of "P".
it deoends the upper and lower bounds of your integration.
for example if you integrate the momentum equation to find discrete momentum equation for "e", your source term will have the form of S=Sc+Se*Ue.
and similarly for w, you will find source term to be: S=Sc+Sw*Uw.

does it help?
Hamidzoka is offline   Reply With Quote

Old   April 27, 2010, 09:19
Default
  #3
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 17
lost.identity is on a distinguished road
Thanks for the reply. Actually that's the problem, because the lower and upper bounds of my integration has to be the cell faces, which are e and w. P is the centre point of this cell.

Imagine the control volume is shown as below.

w |----------P----------| e

I integrate the momentum equation over this control volume. So the unsteady term for example will be of the form

\int_t^{t+\Delta{t}}\,\int_e^w \frac{\partial{\rho{u}}}{\partial{t}}\, dt\,dx = (\rho_P^1{u}_P - \rho_P{u}_P^0)\Delta{x}

where the subscript 1 is the current time step and 0 is the previous and delta_x is the grid size. Here it is assumed that the grid-point value of u (i.e. the value at P) prevails over the control volume.

My problem is, as I mentioned in my first post when I integrate the particular source term that I have, I get u_e (because the source term is actually in the form of a spatial gradient). If this derivative wasn't there I'd get u_P like the unsteady term above.

In the original form by Patankar, the full discretised equation will be like

(a_E + a_W - S_P)u_P = a_Eu_E + a_Wu_W + Sc

so the Sp term needs to be multiplied by the value of u at the same point (whether it may be e, w or P) as a_E and a_W. But I don't know how I could get that. I've seen a number of papers where they've done this for cylinderical coordinates and it should be similar but they never show what the form of Sp they have.
lost.identity is offline   Reply With Quote

Old   April 27, 2010, 23:46
Default
  #4
Senior Member
 
Hamid Zoka
Join Date: Nov 2009
Posts: 282
Rep Power: 18
Hamidzoka is on a distinguished road
Hi;
you problem seems to be quite fundamental!
firstly, you should use staggered contorl when integrating momentum equations.
this method is utilized to prevent an unrealistic pressure field. consider the following domain:
W----w----P----e----E
you should use one of the following CVs for x-momentum discretization:

W|-----w-----|P (backward staggered)

or

P|-----e------|E (forward staggered)

the control volume you discussed before is just used for scalar equations discretization such as mass, energy, K, epsilon, etc.

Secondly, when you discrete x-momentum equation, convection terms(the right side of momentum equation should not be integrated and probably interpolated just like the way you did. when you have convection term you should use "hybrid", "power-low" or similar methods for stability considerations. after doing this you can organize your source terms.
for example if you use forward scheme, all source terms containing "Ue" will be considered as "SeUe" term(just like your SpUp) and the rest (such as "Uw") will be considered as "Sc". (for more information refer to CFD books like the one written by Patankar)

dose it help?
regards
Hamidzoka is offline   Reply With Quote

Old   May 4, 2010, 07:12
Default
  #5
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 17
lost.identity is on a distinguished road
Hi,

Thanks for the reply. Firstly even though I drew the control volume as above, I'm actually using a staggered CV for the momentum equations.

Secondly I am trying to use the power law for the convection terms, for the Cartesian equations this is straightforward but for spherical equations I have additional geometric source terms that's giving me the problem.

The full equation which I'm trying to discretise is

r^2\frac{\partial\overline\rho\tilde{u}}{\partial{t}} + \frac{\partial{J}}{\partial{r}} = -r^2\frac{\partial{\overline{p}}}{\partial{r}} + S

where
J = r^2\left( \overline\rho\tilde{u}\tilde{u} - \Gamma\frac{\partial\tilde{u}}{\partial{r}} \right)

\Gamma = \frac{4}{3}(\mu_t + \mu)

S = -\frac{\partial}{\partial{r}}\left( r^2\Gamma\frac{\tilde{u}}{r}- r^2\frac{2}{3}\overline\rho\tilde{k} \right)

The only problem that I have is the term -\frac{\partial}{\partial{r}}r^2\Gamma\frac{\tilde{u}}{r} in the source S. This term is a bit like the convective term but I don't know exactly how I would treat it.

I was thinking of putting this in the total convective-diffusive flux term J but then I don't know how to obtain the powerlaw from there. Also this is different to what I've seen in some of the papers. They have the convective-diffusive flux and the source terms as shown above.

As I mentioned in my previous post, the problem is when I discretise this source term. Using the forward staggered grid below

w---------P|-----e------|E--------e1

I get,

S_P = \Gamma_Er_Eu_E - \Gamma_Pr_Pu_P

i.e. the velocities here are at the cell faces.

However, the discretisation of the convective terms only gives me the velocity u_e which are the values at the cell centre. So how can I form the source term when this is the case? one of them is at the cell centre and the other at the cell faces?

I could use the interpolation of the cell centres to get the cell face values for example

u_E = \frac{2u_eu_{e1}}{u_e+u_{e1}}

but then I still don't know how I could factorise this interms of u_e.
lost.identity is offline   Reply With Quote

Old   May 7, 2010, 07:46
Default
  #6
New Member
 
George Kosmadakis
Join Date: Apr 2009
Posts: 3
Rep Power: 17
George is on a distinguished road
Hello,

refering to your first post, you can express the Ue, Uw velocities like: Ue=(UP+UE)/2. With this way when you introduce the above equations in the source term, the variable UP appears (together with the UE), which is then inserted in the Sp.

Hope it helps a little bit.


George
George is offline   Reply With Quote

Old   May 8, 2010, 09:56
Default
  #7
Senior Member
 
Join Date: Apr 2009
Posts: 118
Rep Power: 17
lost.identity is on a distinguished road
I realise that I'm going about this the wrong way. I just have to collect the source terms together and multiply it by the volume of the cell.

However, I'm still struggling with the linearization. I've seen a lot of papers and the book by Patankar that explains you how to do this using Taylor series expansion of the source term.

For example

S = S^* + \left(\frac{\partial{S}}{\partial{u}}\right)^*(u-u*)

where the superscript * refers to the value at the previous iteration.


My problem now is with the differentiation since
S = -\frac{\partial}{\partial{r}}\left( r^2\Gamma\frac{\tilde{u}}{r}- r^2\frac{2}{3}\overline\rho\tilde{k} \right)
\Gamma = \frac{4}{3}(\mu_t + \mu)

The eddy viscosity \mu_t is calculated using \mu_t=C_{\mu}\rho\frac{k^2}{\epsilon} where the variables \rho,k,\epsilon are in general functions of u, this would create a more complex source term with a lot of terms and I'm not sure whether this is the right way to go about this?

lost.identity is offline   Reply With Quote

Old   May 8, 2010, 11:07
Default
  #8
New Member
 
George Kosmadakis
Join Date: Apr 2009
Posts: 3
Rep Power: 17
George is on a distinguished road
Hi,

on the other hand, you can use a different methodology, where in the source term "Sc" you include all the terms calculated from the previous iteration. This method is not so robust, since it might need some more time in order to converge. Stability issues might also arise. But according to the problem complexity, it can end up to the same calculations.
George is offline   Reply With Quote

Old   October 10, 2019, 10:29
Angry
  #9
New Member
 
Numan Siddique
Join Date: Jan 2019
Location: India
Posts: 24
Rep Power: 7
siddiquesil is on a distinguished road
Quote:
Originally Posted by Hamidzoka View Post
hi,
"Up" does not necessarily equal to "U" in position of "P".
it deoends the upper and lower bounds of your integration.
for example if you integrate the momentum equation to find discrete momentum equation for "e", your source term will have the form of S=Sc+Se*Ue.
and similarly for w, you will find source term to be: S=Sc+Sw*Uw.

does it help?
I am also trying to solve the N.S equation in spherical co-ordinate.
I have a similar type of source terms in the r-momentum equation which is in derivate form.
But as per my last forum post, I was informed that there is no extra source term in the r-momentum equation apart from physical forces which are pressure, centrifugal, Coriolis, gravitation, etc.

check the link of my last post
How to discretize derivative Source Term??

But I have picked up the r-momentum equation from the wiki page which has lots of source terms in it apart from physical forces. The link is here.
https://en.wikipedia.org/wiki/Navier–Stokes_equations

My questions are as follows.

1. Is the conservative r-momentum equation in spherical co-ordinate given in the wiki page correct?

2. Can you provide me any other link for the conservative N.S equation in spherical co-ordinate?

3. Are there extra terms in momentum equation that arise apart from physical forces for spherical co-ordinate while solving by using FVM?
siddiquesil 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
momentum source term zwdi FLUENT 14 June 27, 2017 15:40
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
UDF Scalar Code: HT 1 Greg Perkins FLUENT 8 October 20, 2000 12:40
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 03:43


All times are GMT -4. The time now is 19:16.