CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)

 phy4me July 4, 2012 10:20

Hello
I am asking your help because I'm stuck and I can't find help.
In fact, I try to develop a numerical code for solving shallow water equations (initially 1D) with the discontinuous Galerkin method. The first step that i can start it is construction of the discretized scheme by following the steps found everywhere in the articles (ideally Cockborne and all.). The physical states are approached by the following formula:

Uh =

I understand at the moment that it need to inject this formula into the discretized form found above.In the case of i = 3 we have three equations to be solved to derive U_h,i.

My question: how i can go back to calculate the U_h

 cfdnewbie July 4, 2012 13:12

here's how you do it:
1) multiply your equation (the PDE) by the test function
2) integrate over the domain/cell
3) use integration by parts to separate volume and boundary terms
4) insert your expansion into the equation
5) that will give you a system to solve for your degrees of freedom u_h,i
6) evaluate the sum (the expansion) per element to get U_h

 phy4me July 4, 2012 13:53

Indeed, this is the sixth point that interests me, i must evaluate the degree of freedom for use it in the sum. And for each item of the sum, i must raplace the function test by his value. It's that required ?

 cfdnewbie July 4, 2012 13:59

Quote:
 Originally Posted by phy4me (Post 369802) Thank you for your response. Indeed, this is the sixth point that interests me, i must evaluate the degree of freedom for use it in the sum. And for each item of the sum, i must raplace the function test by his value. It's that required ?
I am not sure I understand what you are asking.... You are solving for the degrees of freedom u, the basis functions are something you know... So you multily your basis by your dof, add them up and evaluate your polynomial where you need it...

Hope that helps!

 phy4me July 4, 2012 14:35

In fact, what I meant is that after calculating the degrees of freedom we must return to the above formula of the sum to have the value of U in each element. I try to validate this point, because in some code I see U_h = U_h,n[n = max (i)] the last degrees of freedom

 cfdnewbie July 4, 2012 15:01

Quote:
 Originally Posted by phy4me (Post 369808) In fact, what I meant is that after calculating the degrees of freedom we must return to the above formula of the sum to have the value of U in each element. I try to validate this point, because in some code I see U_h = U_h,n[n = max (i)] the last degrees of freedom
Sorry, i don't understand the equation you posted...
To get U in your cell, just evaluate the (full) basis with the dof you computed....btw, are you referring to a modal or nodal scheme?

 All times are GMT -4. The time now is 17:29.