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

 June 4, 2013, 09:56 About UEqn in icoFoam. #1 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 Hi All, This is UEqn code in icoFoam: Code: ```fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) );``` AFAIK,momentum equation can be devided into three components,this three components u v w should be calculated in three algebraic equations,see equation 6.8 and 6.10 in H K Versteeg's book.so why is there only UEqn's matrix?where is VEqn and WEqn? Thanks in advance.

 June 4, 2013, 11:37 #2 Senior Member   Niels Gjoel Jacobsen Join Date: Mar 2009 Location: Deltares, Delft, The Netherlands Posts: 1,603 Rep Power: 25 Hi Forrest, The key point is the type of the matrix, namely Code: `fvVectorMatrix` This tells you that you are solving for a matrix variable, which in this case is the velocity vector U, which has a component for each of the three Cartesian directions. Kind regards Niels

June 4, 2013, 19:40
#3
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
Quote:
 Originally Posted by ngj Hi Forrest, The key point is the type of the matrix, namely Code: `fvVectorMatrix` This tells you that you are solving for a matrix variable, which in this case is the velocity vector U, which has a component for each of the three Cartesian directions. Kind regards Niels
Thanks Niels,

Can you tell me in this situations below,what is the fvvectormatrix?
If there were just three nodes,after dixcretisation of the governing equation.I have:
Code:
```1 2 3   u_1     2
4 5 6   u_2  = 3
7 8 9   u_3     4

11 22 33   v_1     22
44 55 66   v_2  = 33
77 88 99   v_3     44

111 222 333   w_1     222
444 555 666   w_2  = 333
777 888 999   w_3     444```
I think UEqn should not be this:
Code:
```1     2    3
4     5     6
7     8     9
11   22   33
44   55   66
77   88   99
111 222 333
444 555 666
777 888 999```
this looks good which only can be solved for v_1 v_2 v_3:
Code:
```11   22   33
44   55   66
77   88   99```
Where am I wrong?Thanks alot!

 June 6, 2013, 00:02 #4 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 Any ideas?

 June 6, 2013, 22:44 #5 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 I try to print the UEqn: Code: ```fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) ); Info<< UEqn << endl;``` I got this in a 2*2 mesh: Code: ```Lower triangle = 4(-0.05 -0 -0 -0.05) diagonal = 4(0.05 0 0.05 0) Upper triangle = 4{0} [0 4 -2 0 0 0 0] 4{(0 0 0)} 3 ( 2{(0 0 0)} 6{(0 0 0)} 0() ) 3 ( 2{(0 0 0)} 6((0.05 0 0) (0.05 0 0) (-0.05 0 0) (-0.05 0 0) (0 0 0) (0 0 0)) 0() )``` 3*2 mesh: Code: ```Lower triangle = 7(-0.05 -0 -0.05 -0 -0 -0.05 -0.05) diagonal = 6(0.05 0.05 0 0.05 0.05 0) Upper triangle = 7{0} [0 4 -2 0 0 0 0] 6{(0 0 0)} 3 ( 3{(0 0 0)} 7{(0 0 0)} 0() ) 3 ( 3{(0 0 0)} 7((0.05 0 0) (0.05 0 0) (-0.05 0 0) (-0.05 0 0) (0 0 0) (0 0 0) (0 0 0)) 0() )``` But I cannot see anything from this..

 June 12, 2013, 19:37 #6 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 no one is here?

June 20, 2013, 04:00
#7
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
[LaTeX Error: Syntax error]

In this formula, I think the left equation in Jasak's thesis page.145 eqn(3.136) have three componets, so there are three equations, but why is there only one matrix:Ueqn?where is Veqn and Weqn?
Attached Images
 1.jpg (29.4 KB, 24 views)

Last edited by sharonyue; June 27, 2013 at 22:07.

 June 27, 2013, 22:06 #8 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 Still does not get anywhere now.

 June 30, 2013, 21:15 #9 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 675 Rep Power: 8 Code: ```Lower triangle = 7(-0.05 -0 -0.05 -0 -0 -0.05 -0.05) diagonal = 6(0.05 0.05 0 0.05 0.05 0)``` especially this: In a matrix, if the diagonal coefficients are 6, is the upper and lower triangle coefficients should be (5+4+3+2+1)=15?

June 30, 2013, 22:48
#10
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
This is a piece in Fabian Peng Karrholm's Ph.D thesis, :see the image.

OpenFOAM use A.22 to represent this three equations: A.18 A.19 A.20.
But in this thesis there are no more explanations regarding this.
Attached Images
 1.jpg (50.1 KB, 16 views)

 July 2, 2013, 23:27 #11 Senior Member     Santiago Marquez Damian Join Date: Aug 2009 Location: Santa Fe, Santa Fe, Argentina Posts: 418 Rep Power: 14 Hi, the matrix coefficients for the momentum equation are the same, so you have only one matrix. The source term has different values in each direction. Check lines 143-208 in http://foam.sourceforge.net/docs/cpp/a04765_source.html Regards. __________________ Santiago MÁRQUEZ DAMIÁN, Ph.D. Post-doctoral Fellow Research Center for Computational Mechanics (CIMEC) - CONICET/FICH-UNL T.E.: 54-342-4511594 Ext. 1005 Güemes 3450 - (3000) Santa Fe Santa Fe - Argentina http://www.cimec.org.ar

July 2, 2013, 23:44
#12
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 675
Rep Power: 8
Quote:
 Originally Posted by santiagomarquezd Hi, the matrix coefficients for the momentum equation are the same, so you have only one matrix. The source term has different values in each direction. Check lines 143-208 in http://foam.sourceforge.net/docs/cpp/a04765_source.html Regards.
Hi,

After a long struggle, I just made a discretisation of momentum equation manully and found you are right, so I know why there was only one matrix.but I still have many problems so I didnot update this.

While do you know why Ueqn.A() do not equal to the diag.term of Ueqn?Ueqn.A() extract the diag. term from the Ueqn??

And why is this Ueqn looks so mass. Its not like a matrix.

BTW, I read your note regarding to interFoam solve. Its totally wonderful and help me alot.

Regards!

 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 Bylund OpenFOAM Running, Solving & CFD 2 November 20, 2011 21:48 fisch OpenFOAM Programming & Development 1 June 17, 2011 10:57 manuel OpenFOAM Running, Solving & CFD 8 September 22, 2010 04:10 platopus OpenFOAM Bugs 8 April 15, 2008 07:52 msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58

All times are GMT -4. The time now is 15:02.