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

About UEqn in icoFoam.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 4, 2013, 09:56
Default About UEqn in icoFoam.
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
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.
sharonyue is offline   Reply With Quote

Old   June 4, 2013, 11:37
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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
ngj is offline   Reply With Quote

Old   June 4, 2013, 19:40
Default
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by ngj View Post
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!
sharonyue is offline   Reply With Quote

Old   June 6, 2013, 00:02
Default
  #4
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Any ideas?
sharonyue is offline   Reply With Quote

Old   June 6, 2013, 22:44
Default
  #5
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
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..
sharonyue is offline   Reply With Quote

Old   June 12, 2013, 19:37
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
no one is here?
sharonyue is offline   Reply With Quote

Old   June 20, 2013, 04:00
Default
  #7
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
[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
File Type: jpg 1.jpg (29.4 KB, 40 views)

Last edited by sharonyue; June 27, 2013 at 22:07.
sharonyue is offline   Reply With Quote

Old   June 27, 2013, 22:06
Default
  #8
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Still does not get anywhere now.
sharonyue is offline   Reply With Quote

Old   June 30, 2013, 21:15
Default
  #9
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
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?
sharonyue is offline   Reply With Quote

Old   June 30, 2013, 22:48
Default
  #10
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
This is a piece in Fabian Peng Karrholm'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
File Type: jpg 1.jpg (50.1 KB, 37 views)
sharonyue is offline   Reply With Quote

Old   July 2, 2013, 23:27
Default
  #11
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 23
santiagomarquezd will become famous soon enough
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.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Old   July 2, 2013, 23:44
Default
  #12
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 838
Rep Power: 17
sharonyue is on a distinguished road
Quote:
Originally Posted by santiagomarquezd View Post
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?http://www.cfd-online.com/Forums/ope...term-ueqn.html

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.

Thanks for your answer about the momentum predictor. I need time to look it deeply, and I tried to download your thesis about several weeks ago but failed, can you send me one copy? Email:chivasbeijing@qq.com

Regards!
sharonyue is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
icoFoam crash with unreasonable velocity. Bylund OpenFOAM Running, Solving & CFD 2 November 20, 2011 20:48
Source term problem in UEqn of simpleFoam fisch OpenFOAM Programming & Development 1 June 17, 2011 10:57
Density in icoFoam Densidad en icoFoam manuel OpenFOAM Running, Solving & CFD 8 September 22, 2010 04:10
Kubuntu uses dash breaks All scripts in tutorials platopus OpenFOAM Bugs 8 April 15, 2008 07:52
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 06:20.