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

Finite volume methods

Register Blogs Community New Posts Updated Threads Search

Like Tree19Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2023, 18:43
Default
  #21
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
You can pull the dh out of the time derivative when you apply the temporal discretization. Presenting it this way just obfuscates how, what, and when things are being discretized. You are calling it an "approximation" when really you have invoked a discretization. Just keep it neat.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 06:04
Default
  #22
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
My idea is in section 2.



After some further reading of your notes I still do not understand why you do not put directly Eqs.(1) in divergence form and integrate them over Eulerian FVs to solve. That is


drho/dt + d/dx(u*rho)=0


du/dt + d/dx(u^2/2-D*du/dx)=0


and then


drho_bar/dt + (1/h)[(u*rho)|x+h/2-(u*rho)|x-h/2]=0
du_bar/dt + (1/h)[(u^2/2-D*du/dx)|x+h/2-(u^2/2-D*du/dx)|x-h/2]=0


with the second order approximation rho_bar=rho and u_bar=u.


Do you really need to convert in a p-system like?? Why?
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 07:25
Default
  #23
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
After some further reading of your notes I still do not understand why you do not put directly Eqs.(1) in divergence form and integrate them over Eulerian FVs to solve. That is


drho/dt + d/dx(u*rho)=0


du/dt + d/dx(u^2/2-D*du/dx)=0


and then


drho_bar/dt + (1/h)[(u*rho)|x+h/2-(u*rho)|x-h/2]=0
du_bar/dt + (1/h)[(u^2/2-D*du/dx)|x+h/2-(u^2/2-D*du/dx)|x-h/2]=0


with the second order approximation rho_bar=rho and u_bar=u.


Do you really need to convert in a p-system like?? Why?
The original system is complicated so I want to solve the easier system:
nu_t=u_h
(nu*u)_t= ((D/nu)*u_h+u^2/2)_h

These equations scream out for the finite volume method. The more general equations can be put into these form, so I want to solve the easier equations so I want to understand how to solve these, and the finite volume method seems to be the best method.

Thanks to your explanation, I understand the method a lot better, but I need to understand how to apply the boundary conditions correctly. At the momen t, I'm a little confused about how it's done.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 07:50
Default
  #24
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
The original system is complicated so I want to solve the easier system:
nu_t=u_h
(nu*u)_t= ((D/nu)*u_h+u^2/2)_h

These equations scream out for the finite volume method. The more general equations can be put into these form, so I want to solve the easier equations so I want to understand how to solve these, and the finite volume method seems to be the best method.

Thanks to your explanation, I understand the method a lot better, but I need to understand how to apply the boundary conditions correctly. At the momen t, I'm a little confused about how it's done.

The original is complicated? Are you kidding??
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 07:54
Default
  #25
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
For canonical BCs you simply insert them at the level of (20) & (21) directly as face fluxes on the boundary faces. Then you reconstruct missing values according to your interpolation scheme. Hence it's really important that you write out, entirely, the FVM system without any "approximations" and only apply the discretizations, term by term, when and where they are needed.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 09:34
Default
  #26
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
The original is complicated? Are you kidding??
They appear more complicated than first meets the eye. I tied to solve them using the method of lines and matlab's ode solvers, but this failed. I tried to simply do an Euler method, but this failed as well, as I got unphysical results.

I'm at a loss, but this seems to be the best way forward so far.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 09:47
Default
  #27
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
For canonical BCs you simply insert them at the level of (20) & (21) directly as face fluxes on the boundary faces. Then you reconstruct missing values according to your interpolation scheme. Hence it's really important that you write out, entirely, the FVM system without any "approximations" and only apply the discretizations, term by term, when and where they are needed.
The issue I have is that I have both u and u_m in the flux, so as I have a Dirichlet condition at one end, I have a Newmann condition on the other, and I have to find expressions for both at each end, and that can be quite tricky.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 10:09
Default
  #28
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
They appear more complicated than first meets the eye. I tied to solve them using the method of lines and matlab's ode solvers, but this failed. I tried to simply do an Euler method, but this failed as well, as I got unphysical results.

I'm at a loss, but this seems to be the best way forward so far.
To be honest, I don’t know nothing about your background in CFD, but these 1d equations are solved by my CFD students …
You have the 1d Burgers equations, the continuity equation can be solved later.
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 10:16
Default
  #29
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
The issue I have is that I have both u and u_m in the flux, so as I have a Dirichlet condition at one end, I have a Newmann condition on the other, and I have to find expressions for both at each end, and that can be quite tricky.

Yes I understand you have boundary conditions just like every other person that has ever worked with a boundary value probem before you. BCs are exactly the fluxes you need to apply to (20) and (21), if not, then it is not a BC. At the face where you have u you apply u and at the face where you have u_h, the you apply u_h. You would encounter this exact same issue if you solve advection equation, diffusion equation, wave equation, etc.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 10:19
Default
  #30
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
To be honest, I don’t know nothing about your background in CFD, but these 1d equations are solved by my CFD students …
You have the 1d Burgers equations, the continuity equation can be solved later.
Everything numerical I know, I taught myself. So I only know the absolute minimum, finite differences, a little finite element, now finite volume.

You're missing the idea I think, it's not a viscous Burger's equation, it's linked to the other one. The separate when you linearise them, but that's a simple set of equations to solve the issue becomes when they're coupled.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 10:21
Default
  #31
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Yes I understand you have boundary conditions just like every other person that has ever worked with a boundary value probem before you. BCs are exactly the fluxes you need to apply to (20) and (21), if not, then it is not a BC. At the face where you have u you apply u and at the face where you have u_h, the you apply u_h
I'm not sure what you're saying, so let me clarify with an example. at h=0, I have the boundary condition u=0. However, I also have to find u_m at the boundary h=0, I have no information for that, so how would I construct it?
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 10:23
Default
  #32
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
@Filippo, what mat calls complicated is the linearized Cauchy Stress equations not shown here. The motivation is they would like to solve this Berger's equation to learn how to solve slightly more complicated stress transport equation. We are all in agreement that what is shown, is a very simple equation.
FMDenaro likes this.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 10:26
Default
  #33
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
I'm not sure what you're saying, so let me clarify with an example. at h=0, I have the boundary condition u=0. However, I also have to find u_m at the boundary h=0, I have no information for that, so how would I construct it?
1) It is a free variable and you construct it using the interpolation scheme that you use to determine the flux everywhere else. Alternatively, it need not be exactly the same interpolation scheme used as everywhere else but can have its own distinct interpolation scheme.

2) You don't have enough constraints to fully define your boundary and need to go determine what additional boundary conditions you need.

Consider in navier-stokes for example that we have no-slip at the wall which is u=0 at y=0. This leaves free v, w, and du, dv, and dw, just what you are asking. Yet another example is heat equation where you apply a heat flux dT/dx=a, this leaves T to be whatever it needs to be.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 10:27
Default
  #34
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
@Filippo, what mat calls complicated is the linearized Cauchy Stress equations not shown here. The motivation is they would like to solve this Berger's equation to learn how to solve slightly more complicated stress transport equation. We are all in agreement that what is shown, is a very simple equation.
If it's simple, then why is it difficult to solve? I don't understand why.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 10:29
Default
  #35
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
If it's simple, then why is it difficult to solve? I don't understand why.

It's much simpler than the linearized navier-stokes which itself is much simpler than navier-stokes. At the same time, the fully Cauchy-Stress momentum transport equation itself is a more generalized form of the navier-stokes. I wouldn't say navier-stokes is difficult to solve, thousands of people do it daily. In your case however, there are some gaps in the know-how that you need to address.
LuckyTran is offline   Reply With Quote

Old   August 9, 2023, 10:32
Default
  #36
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by LuckyTran View Post
@Filippo, what mat calls complicated is the linearized Cauchy Stress equations not shown here. The motivation is they would like to solve this Berger's equation to learn how to solve slightly more complicated stress transport equation. We are all in agreement that what is shown, is a very simple equation.
That’s clear, we agree but for any person starting working in such a simple numerical example, the best way to learn FVM is to apply the FTCS and FTUS method to Burgers equation. Then, if u is coupled to rho by a further functional relation is a different issue. But, at least one starts by know how to solve the non linear equation in conservative form with the correct BCs.
My opinion, as a CFD teacher, is that so far he lost time …
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 10:34
Default
  #37
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
Everything numerical I know, I taught myself. So I only know the absolute minimum, finite differences, a little finite element, now finite volume.

You're missing the idea I think, it's not a viscous Burger's equation, it's linked to the other one. The separate when you linearise them, but that's a simple set of equations to solve the issue becomes when they're coupled.
Can I suggest to stop for a moment and just focus about the solution of the Burgers equations in conservative form? Do you know FTUS and FTCS schemes?

Are you able to apply in conservative form on the single Burgers equation first using periodic BCs?
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 10:36
Default
  #38
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Can I suggest to stop for a moment and just focus about the solution of the Burgers equations in conservative form? Do you know FTUS and FTCS schemes?

Are you able to apply in conservative form on the single Burgers equation first using periodic BCs?
I can solve the viscous Burgers equation using backwards Euler and Newton raphson method.
hunt_mat is offline   Reply With Quote

Old   August 9, 2023, 10:41
Default
  #39
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,830
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by hunt_mat View Post
I can solve the viscous Burgers equation using backwards Euler and Newton raphson method.
So you need to learn first different formulations.
Try first the explicit first order accurate upwind method in conservative form for the single viscous Burgers equation.
Define a flux(i) on each face and store the convective and diffusive fluxes.
Then the update of the velocity and the Bcs
FMDenaro is offline   Reply With Quote

Old   August 9, 2023, 11:10
Default
  #40
Senior Member
 
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 178
Rep Power: 4
hunt_mat is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
So you need to learn first different formulations.
Try first the explicit first order accurate upwind method in conservative form for the single viscous Burgers equation.
Define a flux(i) on each face and store the convective and diffusive fluxes.
Then the update of the velocity and the Bcs
That's what I'm doing currently. I'm currently trying to figure out how to do the differencing for the mass differences.
hunt_mat is offline   Reply With Quote

Reply

Tags
finite volume method


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
multiphaseEulerFoam FOAM FATAL IO ERROR qutadah.r OpenFOAM Running, Solving & CFD 11 December 10, 2021 20:18
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? EternalSeekerX SU2 3 October 9, 2020 18:28
Problem of simulating of small droplet with radius of 2mm liguifan OpenFOAM Running, Solving & CFD 5 June 3, 2014 02:53
Gradient evaluation in Finite Volume Methods yidongxia Main CFD Forum 7 August 6, 2012 10:23
Unstructured grid finite volume methods Marcus Main CFD Forum 3 December 5, 2000 00:25


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