# Question about the DG implementation

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

 July 4, 2012, 10:20 Question about the DG implementation #1 Member   E. Chaabelasri Join Date: Oct 2010 Location: Morocco Posts: 35 Rep Power: 9 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 __________________ ---- E. Chaabelasri Phd, CFD Research staff Personal website RG

 July 4, 2012, 13:12 #2 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 557 Rep Power: 13 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

 July 4, 2012, 13:53 #3 Member   E. Chaabelasri Join Date: Oct 2010 Location: Morocco Posts: 35 Rep Power: 9 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 ? __________________ ---- E. Chaabelasri Phd, CFD Research staff Personal website RG

July 4, 2012, 13:59
#4
Senior Member

cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 13
Quote:
 Originally Posted by phy4me 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!

 July 4, 2012, 14:35 #5 Member   E. Chaabelasri Join Date: Oct 2010 Location: Morocco Posts: 35 Rep Power: 9 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 __________________ ---- E. Chaabelasri Phd, CFD Research staff Personal website RG

July 4, 2012, 15:01
#6
Senior Member

cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 13
Quote:
 Originally Posted by phy4me 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?

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post imnull ANSYS 0 March 5, 2012 14:51 atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 16:26 universez OpenFOAM Running, Solving & CFD 0 January 12, 2010 21:31 kallipygian OpenFOAM Running, Solving & CFD 0 October 13, 2008 07:29 Suresh Main CFD Forum 3 August 12, 2005 04:37

All times are GMT -4. The time now is 10:50.