CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

FvVectorMatrix questions

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2006, 07:29
Default hi all, i try to change the
  #1
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 17
stephan is on a distinguished road
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 old-value 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
stephan is offline   Reply With Quote

Old   February 1, 2006, 10:08
Default Continuity Eq: div(U) = 0 and
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
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 momentum-predictor 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
niklas is offline   Reply With Quote

Old   February 1, 2006, 10:36
Default hi niklas, at first: thanx
  #3
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 17
stephan is on a distinguished road
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 corrector-step) , what just depends on how it is implemented - the paper of Issa(1985) - the first PISO-paper 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
stephan is offline   Reply With Quote

Old   February 1, 2006, 10:54
Default 1. The first step is based on
  #4
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 29
niklas will become famous soon enoughniklas will become famous soon enough
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
niklas is offline   Reply With Quote

Old   February 1, 2006, 11:01
Default hi niklas, i will exercise
  #5
Senior Member
 
Stephan Gerber
Join Date: Mar 2009
Location: Germany
Posts: 118
Rep Power: 17
stephan is on a distinguished road
hi niklas,

i will exercise that
thanx!!
stephan
stephan is offline   Reply With Quote

Old   May 4, 2007, 07:08
Default Hi, So if I change the mome
  #6
Member
 
Erik Arlemark
Join Date: Mar 2009
Location: Eindhoven, Netherlands
Posts: 47
Rep Power: 17
Erik is on a distinguished road
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
Erik is offline   Reply With Quote

Old   May 4, 2007, 07:23
Default yep, the discretised momentum
  #7
Senior Member
 
Markus Hartinger
Join Date: Mar 2009
Posts: 102
Rep Power: 17
hartinger is on a distinguished road
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 off-diagonal coefficients times velocity. So, any change in the matrix setup will be reflected in 'A' and 'H'
hartinger is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 21:27.