|
[Sponsors] |
August 8, 2023, 10:24 |
Finite volume methods
|
#1 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
I've been reading the book, "Finite volume method for hyperbolic problems" by Randall LeVeque. In chapter 4 of his book, he goes on about averaging over the cell, which is an integral (in 1D) from edge to edge, and the integral itself, the average of the quantity over the cell is the new variable, and he talks about scheme using this variable.
I've seen other books on the topic where they do the usual integral but they approximate the average as the centroid multiplied by the volume. Typically the centroid is the mid-point of the cell. Is this the same method? I'm unsure how to get the averaged quantities from the edge values once I've done the integral. |
|
August 8, 2023, 10:39 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
Consider that you do a volume integral over a computational cell and that this integration is single valued. This volume integral is the cell value. It doesn't matter what location in the cell has this value (you just create a different stencils later one) or that any location actually does match this value.
|
|
August 8, 2023, 11:05 |
|
#3 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Your question is, indeed, one of the sources of confusion in evaluating the accuracy order of a FV method. The example I can use in 1D is du/dt + d F(u)/dx =0 that, expressed in the integral form is d u_bar/dt + (1/h)*[F(u(x+h/2)) - F(u(x-h/2))]=0 (1) with u_bar(x,t) = (1/h)*Int[x-h/2,x+h/2] u(x',t) dx' (2) You can see that Eq.(1) is not closed in terms of the variable u_bar since the fluxes are function of u. However, you know the exact functional relation between u_bar and u. A simple Taylor expansion introduced in the RHS of (2) allows to see that when x is a centroid position, then u_bar(x,t)=u(x,t) + (h^2/24)*d2u/dx^2 + ... (3) If a global second order accuracy is the goal, you can simply set the first term in (3) as a second order approximation. But now the confusion can be generated by the notation of higher order FV method. You can use some high order reconstruction for the flux function F but if you still retain a second order approximation in (3), the resulting variable u_bar will be always second order accurate in terms of u, irrespective of any high order flux reconstruction. This framework is relevant to understand the properties of convergence in the FV method. It is worthwhile to note that the fact that Eq.(2) is not closed is exactly the problem you see in the LES equations based on the top-hat filter. |
||
August 8, 2023, 12:08 |
|
#4 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
So if my set of equations are:
nu_t=u_h (nu*u)_t =((D/nu)*u_h+u^2/2)_h h_x=1/nu Here h is the mass co-ordinate introduced into LeVeque (eq 2.107), my h is his \xi. And I do the integral over a generic cell to get: nu_i*h_i=[u]_{h_}^{h+} nu_i*u_i*h_i=[(D/nu)*u_h+u^2/2]_{h_}^{h+} Where I have approximated the average using your equation (3). I then use averaging to obtain the relevant quantities inside the cell? Using averaging in this way doesn't yield an upwind scheme for nu, is this a problem in this set up? When it comes to boundary conditions, I have odd conditions, I know u at one end, and not the other. On the other end, I know u_h but not u. Do I use the averaging trick to find these? |
|
August 8, 2023, 12:14 |
|
#5 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Please, attach a file, this way I'm sure to understand your notation |
||
August 8, 2023, 12:28 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
Ok, I had a look to the equations in the textbook, you are using a Lagrangian approach, therefore you have a material volume, not an Eulerian volume. That means you follow a certain material volume that at t0 has position x0. The shape of your volume is one of the unknown to determine. Note that this is very different from what I wrote above that refers to the Eulerian FV method. However, you alwaya have the fact that the time variation of a variable integrated over the lagrangian volume depends on the fluxes on the surface. That is, the equation and the intial condition do not close theoretically the problem. |
||
August 8, 2023, 12:58 |
Lagrangian conservative form.
|
#7 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
My idea is in section 2.
|
|
August 8, 2023, 13:02 |
|
#8 | |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
Quote:
|
||
August 8, 2023, 13:20 |
|
#9 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
||
August 8, 2023, 13:57 |
|
#10 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
So equations (18) and (19) are my equations in conservative form written in Lagrangian mass co-ordinates. I integrate both sides over a general cell. This leaves the fluxes to be evaluated on the cell boundaries. I then use the averaging trick to get values at the cell centroids.
|
|
August 8, 2023, 14:08 |
|
#11 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Quote:
But you have already that ... look at the equation before (2.106). The point xi1 and xi2 are the face of the lagrangian volume, not a generic cell. |
||
August 8, 2023, 14:29 |
|
#12 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
Then I'm confused about what you're asking. If we look at them as PDEs then we can split the domain into cells as I did.
|
|
August 8, 2023, 14:48 |
|
#13 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
This is somehow confusing because you have a lagrangian PDE equation for the volume-averaged variable. If you integrate further your variable is averaged twice. Just solve the integral equation written above (2.106).
|
|
August 8, 2023, 15:17 |
|
#14 | |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
Quote:
Just think of h as being another variable. |
||
August 8, 2023, 15:26 |
|
#15 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Eq.(2.104) is the integral equation for the specific volume.
|
|
August 8, 2023, 15:41 |
|
#16 |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
||
August 8, 2023, 18:00 |
|
#17 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66 |
You have continuity and momentum (18) and (19). You integrate over the volume the FVM way and apply gauss divergence theorem which gives you (20) and (21). The integral of a volume average quantity is the average and you do not need (22). I'm not sure if you skipped a step but in (23) the dh should be inside the time derivative because h is time-depedent, unlike the Eulerian case. Or maybe you meant to explain the extra conditions but didn't have the time.
And then, you retrieve the fluxes via reconstruction from the cell average quantities. And here is where the error analysis that Filippo described would come into play. |
|
August 8, 2023, 18:19 |
|
#18 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,896
Rep Power: 73 |
Still not clear to me the basic idea ... h depends on time, the grid is lagrangian not eulerian, the equations are somehow the 1D counterpart of the equation deduced in the Reynolds transport theorem.
As appear in LeVeque, Sec.2.13 describes the integral form of the two equations (integral between mass-points xi1 and x2) for U_bar and V_bar. These latter are, however, still lagrangian averaged-value and the reconstruction of the fluxes from averaged values is required. Then, the presence of second derivatives changes the mathematical character of the problem (from hyperbolic to parabolci) and the number of boundary conditions required. |
|
August 8, 2023, 19:32 |
|
#19 | |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
Quote:
One of the problems I have is how to apply the boundary conditions as well. |
||
August 8, 2023, 19:37 |
|
#20 | |
Senior Member
Matthew
Join Date: Mar 2022
Location: United Kingdom
Posts: 184
Rep Power: 4 |
Quote:
|
||
Tags |
finite volume method |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
multiphaseEulerFoam FOAM FATAL IO ERROR | qutadah.r | OpenFOAM Running, Solving & CFD | 11 | December 10, 2021 21:18 |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 19:28 |
Problem of simulating of small droplet with radius of 2mm | liguifan | OpenFOAM Running, Solving & CFD | 5 | June 3, 2014 03:53 |
Gradient evaluation in Finite Volume Methods | yidongxia | Main CFD Forum | 7 | August 6, 2012 11:23 |
Unstructured grid finite volume methods | Marcus | Main CFD Forum | 3 | December 5, 2000 01:25 |