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

How to discretize derivative Source Term??

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 30, 2019, 16:27
Default How to discretize derivative Source Term??
  #1
Member
 
Numan Mazumder
Join Date: Jan 2019
Location: India
Posts: 35
Rep Power: 7
siddiquesil is on a distinguished road
I am trying to solve the Navier Stokes Equation (2D) for Spherical Co-ordinates using FVM. I have come across a source term in derivative form.

My souce term is \frac{2}{r^{2}}\frac{\partial }{\partial r}\left(\mu r^{2} \frac{V_{r}}{r} \right)

Now after integrating the above term along with north&south faces of the control volume, we can write it as--

2\left[ \left(\mu r^2 \frac{V_r}{r} \right)_n - \left(\mu r^2 \frac{V_r}{r} \right)_s\right]\triangle\theta sin\theta_p

which can be further simplified as
2\left[\mu_{n}\left(area\right)_n\left(\frac{V_r}{r}\right)_{n}- 
 \mu_{s}\left(area\right)_s\left(\frac{V_r}{r}\right)_{s}\right]

where
\left(area\right)_n = r_n^2\triangle\theta sin\theta_{P}
\left(area\right)_s = r_s^2\triangle\theta sin\theta_{P}

My questions are.
1. Should I interpolate the velocity to the main grid point from north and south faces?
2. After interpolating, should I used the old values for the source term?
3. Is there any other way to handle this kind of source term?
4. For source term linearization, as per Patankar formulation S=Sc+Sp.U
Can I have source terms in other grid points also?

I mean to say, as like S= Sc+Sp.U
Can I have S=Sc+Sw.U, S=Sc+Sn.U, S=Sc+Ss.U, S=Sc+Se.U ?

5. Can you please suggest me any good book/reference for my query?

Regards.
Numan Siddique
siddiquesil@gmail.com
siddiquesil is offline   Reply With Quote

Old   September 30, 2019, 17:04
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by siddiquesil View Post
I am trying to solve the Navier Stokes Equation (2D) for Spherical Co-ordinates using FVM. I have come across a source term in derivative form.

My souce term is \frac{2}{r^{2}}\frac{\partial }{\partial r}\left(\mu r^{2} \frac{V_{r}}{r} \right)

Now after integrating the above term along with north&south faces of the control volume, we can write it as--

2\left[ \left(\mu r^2 \frac{V_r}{r} \right)_n - \left(\mu r^2 \frac{V_r}{r} \right)_s\right]\triangle\theta sin\theta_p

which can be further simplified as
2\left[\mu_{n}\left(area\right)_n\left(\frac{V_r}{r}\right)_{n}- 
 \mu_{s}\left(area\right)_s\left(\frac{V_r}{r}\right)_{s}\right]

where
\left(area\right)_n = r_n^2\triangle\theta sin\theta_{P}
\left(area\right)_s = r_s^2\triangle\theta sin\theta_{P}

My questions are.
1. Should I interpolate the velocity to the main grid point from north and south faces?
2. After interpolating, should I used the old values for the source term?
3. Is there any other way to handle this kind of source term?
4. For source term linearization, as per Patankar formulation S=Sc+Sp.U
Can I have source terms in other grid points also?

I mean to say, as like S= Sc+Sp.U
Can I have S=Sc+Sw.U, S=Sc+Sn.U, S=Sc+Ss.U, S=Sc+Se.U ?

5. Can you please suggest me any good book/reference for my query?

Regards.
Numan Siddique
siddiquesil@gmail.com





What is wrong with your approach is that you are writing the equations for a finite difference scheme...conversely, you must start from the general conservative form and write the integral of the fluxes.


Have a look for example to this paper https://arxiv.org/abs/1404.0537
siddiquesil likes this.
FMDenaro is offline   Reply With Quote

Old   September 30, 2019, 19:26
Default
  #3
Member
 
Numan Mazumder
Join Date: Jan 2019
Location: India
Posts: 35
Rep Power: 7
siddiquesil is on a distinguished road
Thank you for your reply.

I have discretized the N.S equation for spherical coordinate using Finite volume method. Here are the full details of the discretization scheme where I have used the flux term.

Navier Equation for spherical coordinate in r-direction is given as

\frac{\partial \left(\rho V_r\right)}{\partial t}+\frac{1}{r^2}\frac{\partial }{\partial r}\left(\rho r^2  V_r^2\right)+\frac{1}{r sin\theta}\frac{\partial }{\partial \theta}\left(\rho  sin\theta  V_r V_\theta\right)-\frac{\rho V_\theta^2}{r}=
-\frac{\partial p}{\partial r}+\frac{1}{r^2}\frac{\partial }{\partial r}\left(\mu r^2 \frac{\partial V_r}{\partial r}\right)+\frac{1}{r^2 sin\theta}\frac{\partial }{\partial \theta}\left(\mu sin\theta \frac{\partial V_r}{\partial \theta}\right)+\frac{2}{r^2}\frac{\partial }{\partial r}\left(\mu r^2 \frac{V_r}{r}\right)

After rearranging the convection-diffusion term, the above equation can be written as

\frac{\partial \left(\rho V_r\right)}{\partial t}+\frac{1}{r^2}\frac{\partial }{\partial r}\left(\rho r^2  V_r^2 - \mu r^2 \frac{\partial V_r}{\partial r}\right)+\frac{1}{r sin\theta}\frac{\partial }{\partial \theta}\left(\rho  sin\theta  V_r V_\theta - \mu sin\theta \frac{\partial V_r}{r\partial \theta}\right)=
-\frac{\partial p}{\partial r}+\frac{\rho V_\theta^2}{r}+\frac{2}{r^2}\frac{\partial }{\partial r}\left(\mu r^2 \frac{V_r}{r}\right)

which can be written by using flux term

\frac{\partial \left(\rho V_r\right)}{\partial t}+\frac{1}{r^2}\frac{\partial }{\partial r}\left( r^2 J_r\right)+\frac{1}{r sin\theta}\frac{\partial }{\partial \theta}\left( sin\theta J_\theta\right)=-\frac{\partial p}{\partial r}+\frac{\rho V_\theta^2}{r}+\frac{2}{r^2}\frac{\partial }{\partial r}\left(\mu r^2 \frac{V_r}{r}\right)

where the fluxes are defined as
J_r=\left(\rho  V_r^2 - \mu \frac{\partial V_r}{\partial r}\right) , J_\theta=\left(\rho    V_r V_\theta - \mu  \frac{\partial V_r}{r\partial \theta}\right)

In the above equation, all the term of the right-hand side is source terms.
First two-term of the right-hand of the above equation can be easily found out. Pressure term is hand via the SIMPLER algorithm.

My doubt is about the 3rd source term of the right-hand side of the equation.
siddiquesil is offline   Reply With Quote

Old   September 30, 2019, 19:36
Default
  #4
Member
 
Numan Mazumder
Join Date: Jan 2019
Location: India
Posts: 35
Rep Power: 7
siddiquesil is on a distinguished road
after discretization of the above equation, the final form can be written as.

A_n\left(J_r\right)_n-A_s\left(J_r\right)_s+A_w\left(J_\theta\right)_w-A_e\left(J_\theta\right)_e=A_e(P_E-P_W)+\left(\frac{\rho V_\theta^2}{r}\right)_P \triangle V+2\left[A_n\left(\frac{V_r}{r}\right)_n-A_s\left(\frac{V_r}{r}\right)_s\right]

Where,
A_n = area of the north face
A_s = area of the south face
A_w=area of the west face
A_e =area of the east face
\triangle V= volume.

My questions are only about the last term.
1. How to handle the last term of the above equation?
2. Should I interpolate the value of north&south faces to the main grid point for the last term?
3. Can I write the last term as S=Sc+Sn.V & S=Sc+Ss.V as like S=Sc+Sp.V?
siddiquesil is offline   Reply With Quote

Old   October 1, 2019, 08:18
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,882
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Actually, there is no source term in the momentum equation. A source term is something that must be added explicitly as a consequence of a physical external forcing.
From what you wrote I see you are not focusing the fact that in a FVM the fluxes must be written to ensure conservation. You haven't read the paper I linked.
FMDenaro is offline   Reply With Quote

Old   October 1, 2019, 20:54
Default
  #6
Member
 
Numan Mazumder
Join Date: Jan 2019
Location: India
Posts: 35
Rep Power: 7
siddiquesil is on a distinguished road
Thank you very much. Finally, I have understood my mistakes as there would not any extra terms as a source in the momentum equation apart from the pressure, and centrifugal forces in my case. I would like to read the reference provided by you. Thank you again.

regards:
Numan Siddique Mazumder.
India
siddiquesil is offline   Reply With Quote

Reply


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
[Other] Tabulated thermophysicalProperties library chriss85 OpenFOAM Community Contributions 62 October 2, 2022 04:50
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 04:30
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41


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