
[Sponsors] 
February 6, 2014, 07:12 
ddtSchemes, How Euler and CrankNicolson descritize?

#1 
Member
Join Date: Feb 2012
Posts: 49
Rep Power: 6 
I want to solve( ddt(U) == F ) in which both U and F are volVectorField.
I get three different results when i use these three approaches! I expect that all of them should be same 1) forAll(U, cellI) U[cellI] += runTime.deltaTValue()*F[cellI]; 2) solve(fvm::ddt(U)==F); //Euler descritization 3) solve(fvm::ddt(U)==F); //CrankNicolson descritization Do you know why they don't give same result? Because i think all of them do this : ( Unew = Uold + F*dt) Last edited by ooo; February 10, 2014 at 12:39. 

February 10, 2014, 12:41 

#2 
Member
Join Date: Feb 2012
Posts: 49
Rep Power: 6 
I edited my above question completely to avoid posting a new thread.
I would appreciate if anyone helps about this new question. 

February 10, 2014, 17:57 

#3 
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 144
Rep Power: 8 
hello ooo,
I just followed a CFD course (on youTube) and found out there are a lot of ways to look at and use the meshdata. Every way has his own advantages and disadvantages. Your question is answered on this wiki link http://en.wikipedia.org/wiki/Crank%E...icolson_method hope this helps Wouter NB. as you can read in the first line I am an expert, because I read a book. 

February 10, 2014, 18:07 

#4  
Member
Join Date: Feb 2012
Posts: 49
Rep Power: 6 
Quote:
But the point is that in the right hand side of my equation, there is an independent value of U, therefore the time descritizations should not be different to each other in this equation.So i wonder why these three approaches give me different results. 

February 11, 2014, 03:55 

#5 
New Member
Lorenzo A. Ricciardi
Join Date: Mar 2011
Posts: 27
Rep Power: 7 
Euler and CrankNicholson must give different results if F is time dependent, as the first one basically should perform as your method 1 while the second one is a blend of Forward Euler and Backwards Euler.
As to why method 1 and 2 are not the same (I don't remember exactly and don't have time to check right now) it should be a dimensional issue: Euler should work with volume integrated fields, thus if you have a constant F field but different mesh volumes, your actual "F" term will be F*volume. Try to print the dimensions of U, F and ddt(U)... 

February 11, 2014, 07:35 

#6  
Member
Join Date: Feb 2012
Posts: 49
Rep Power: 6 
Quote:
About the dimension, my F field has the dimension of (m/s2).Also the dimension of the ddt(U) is (m/s2).Is there any problem here? because in both 1 and 2, the rhs and lhs seem have the same dimension. About the difference between euler and crankNicolson, i know their mathematical formula, but im confused with my algorithm : In each time step : *I solve the momentum equation *use the computed velocity to compute F (by some formulas...), *Solving (ddt(u)=F) to recompute U. So, If it is descritized like this : (UnewUold)/dt = Fnew (Implicit euler) (UnewUold)/dt = 0.5*(Fnew+Fold) (crankNicolson) The confusing part for me is the term (Fnew). Because in an implicit descritization, the RHS is descritized in the same time step, and in general we should not have Fnew! but the point is that i should use the value of F which was calculated in a line before of this equation in the same time step! If it is going to use the known F, then it is not the implicit method anymore! So again the same question comes up that how (ddt(U)=F) is descritized in my algorithm? 

Thread Tools  
Display Modes  

