
[Sponsors] 
February 1, 2006, 06:29 
hi all,
i try to change the

#1 
Senior Member
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 12 
hi all,
i try to change the piso algorithm for incomp. flows (zero divergence condition) to a piso for incomp. flow with a given divergence that is non zero but constant for one timestep. ( the value will change over time but is known) in this forum it was mentioned that UEqn.H() gives something like \sum_n a_n u_n. is the pressure gradient and the oldvalue for the velocity U included in Ueqn.H()??? Does UEqn.H change the a_n if U changes or are the coefficients constant for one timestep. and if the pressure gradient in included in UEqn.H(), does UEqn.H() change when the pressure changes? i hope somebody can help me.. thanx in advance stephan 

February 1, 2006, 09:08 
Continuity Eq: div(U) = 0
and

#2 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 694
Rep Power: 24 
Continuity Eq: div(U) = 0
and with source term: div(U) = S Discretised momentum eq. A*U = H  grad(p) > U = H/A (1/A)*grad(p) = Ustar  (1/A)*grad(p) H/A is the momentumpredictor value of U, ie Ustar. if we insert this in the continuity eq. it yields div(U) = div(Ustar  (1/A)*grad(p)) = S > div(Ustar)  laplacian(1/A, p) = S or laplacian(1/A, p) = S + div(phi) where phi is Ustar evaluated on faces. have a look at icoFoam and you will easily see where to insert S. N 

February 1, 2006, 09:36 
hi niklas,
at first: thanx

#3 
Senior Member
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 12 
hi niklas,
at first: thanx a lot!! i was just concerned if i have to include the source once(first corrector step) in the pressure equation or twice(in the second correctorstep) , what just depends on how it is implemented  the paper of Issa(1985)  the first PISOpaper i guess  has two different approaches for the solution of such systems. i would be still interested in whether the discretised flux changes when i do something like the following lines or not: U=UEqn.H()/UEqn.A(); do something.. U=somthing else U=UEqn.H()/UEqn.A(); does a_n change with U()changes? i hope the questions are not too ...  sorry but i am pretty new in c++ in still new into Foam stephan 

February 1, 2006, 09:54 
1. The first step is based on

#4 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 694
Rep Power: 24 
1. The first step is based on the momentum, so
if you want to add a force, you should do this here. 2. The 'second' step solves pressure to satisfy the continuity eq. and after updates U. If you have a source term due to mass transfer, this should be added here. So do not add the same source to both steps, since Im guessing that it will not be the same mass and momentum source. If UEqn.A() changes.... This is so easy to check for yourself. In fact, I suggest you answer this yourself as an exercise. If you run the cavity example with only, lets say 2x2x1 cells and write out the U, UEqn.A() and UEqn.H() after each of the above steps you will find out for yourself. I.e. just add: Info << U << endl; Info << UEqn.A() << endl; Info << UEqn.H() << endl; at suitable positions in the code N 

February 1, 2006, 10:01 
hi niklas,
i will exercise

#5 
Senior Member
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 12 
hi niklas,
i will exercise that thanx!! stephan 

May 4, 2007, 06:08 
Hi,
So if I change the mome

#6 
Member
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 12 
Hi,
So if I change the momentum equation for solving U (first step) I wont need to change the form of the semi discretised momentum equation in step 2? Does the change follow the A and H matrixes? regards Erik 

May 4, 2007, 06:23 
yep, the discretised momentum

#7 
Senior Member
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 12 
yep, the discretised momentum equation is generic. Meaning, that however you construct the momentum equation itself, you don't need to change the discretised equation.
'A' contains the diagonal matrix coefficients, 'H' contains the offdiagonal coefficients times velocity. So, any change in the matrix setup will be reflected in 'A' and 'H' 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
FvVectorMatrix  cfdengineering  OpenFOAM Running, Solving & CFD  0  December 1, 2005 09:51 
UDS questions  Z  FLUENT  1  March 31, 2005 14:54 
UDS Questions  Y  FLUENT  0  March 19, 2005 11:58 
Few questions  phi  FLUENT  0  March 4, 2005 09:23 
Some questions  P  FLUENT  3  February 3, 2005 10:10 