# Ueqn.A() extract the diag. term from the Ueqn??

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

 July 2, 2013, 23:19 Ueqn.A() extract the diag. term from the Ueqn?? #1 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 754 Rep Power: 10 Sponsored Links I just made a testify, add this code into icoFoam: Code: ```fvVectorMatrix UEqn ( fvm::ddt(U) + fvm::div(phi, U) - fvm::laplacian(nu, U) ); Info<<"UEqn:" << UEqn << endl; Info<<"UEqn.A():" << UEqn.A()<< endl; Info<<"UEqn.H():" << UEqn.H()<< endl; //solve(UEqn == -fvc::grad(p)); // --- PISO loop``` Then I run a 9 nodes cavity case. It output this in the first timestep: Code: ```Create time Create mesh for time = 0 Reading transportProperties Reading field p Reading field U Reading/calculating face flux field phi Starting time loop Time = 0.005 Courant Number mean: 0 max: 0 UEqn:Lower triangle = 12 ( -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 ) diagonal = 9(0.00012 0.00015 0.00012 0.00015 0.00018 0.00015 0.00012 0.00015 0.00012) Upper triangle = 12 ( -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 -3e-05 ) [0 4 -2 0 0 0 0] 9{(0 0 0)} 3 ( 3((6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05)) 9((6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05) (6e-05 6e-05 6e-05)) 0() ) 3 ( 3((6e-05 0 0) (6e-05 0 0) (6e-05 0 0)) 9{(0 0 0)} 0() ) UEqn.A():dimensions [0 0 -1 0 0 0 0]; internalField nonuniform List 9(800 700 800 700 600 700 800 700 800); boundaryField { movingWall { type zeroGradient; } fixedWalls { type zeroGradient; } frontAndBack { type empty; } } UEqn.H():dimensions [0 1 -2 0 0 0 0]; internalField nonuniform List 9((0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (0 0 0) (200 0 0) (200 0 0) (200 0 0)); boundaryField { movingWall { type zeroGradient; } fixedWalls { type zeroGradient; } frontAndBack { type empty; } }``` So in this log, Why Ueqn.A()'s internal field is not equal to the Ueqn's diag. term? I mark this two in the red. Thanks in advance, utkunun likes this.

 July 4, 2013, 05:40 #2 Senior Member   Dongyue Li Join Date: Jun 2012 Location: Torino, Italy Posts: 754 Rep Power: 10 If A()=diag()/mesh.V(), this is my mesh: Code: ```convertToMeters 0.03; vertices ( (0 0 0) (1 0 0) (1 1 0) (0 1 0) (0 0 0.1) (1 0 0.1) (1 1 0.1) (0 1 0.1) ); blocks ( hex (0 1 2 3 4 5 6 7) (3 3 1) simpleGrading (1 1 1) );``` So V is 0.003*0.01*0.01=0.000003. but 0.00012/0.000003 does not equal to 800. utkunun likes this.

 July 24, 2013, 11:08 #3 Member   Join Date: Aug 2010 Posts: 31 Rep Power: 9 Hi, Ueqn.A()=diag()/mesh.V() holds true only for cells, which do not contact the boundary. E.g. in your example: 600=0.00018/(0.01*0.01*0.003) [and be careful mesh.V()=3e-7 (not 3e-6)]. At the moment I'm also trying to clarify details about the "Ueqn.A()". B.r. Martin. sharonyue and utkunun like this.

July 24, 2013, 11:12
#4
Senior Member

Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 754
Rep Power: 10
Quote:
 Originally Posted by Martin80 Hi, Ueqn.A()=diag()/mesh.V() holds true only for cells, which do not contact the boundary. E.g. in your example: 600=0.00018/(0.01*0.01*0.003) [and be careful mesh.V()=3e-7 (not 3e-6)]. At the moment I'm also trying to clarify details about the "Ueqn.A()". B.r. Martin.
So this is only true for inner cells, not boundary cells. Thats clear! Thx very much!

 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 sr_tenedor OpenFOAM Programming & Development 2 June 6, 2014 06:59 Anne Lincke OpenFOAM Running, Solving & CFD 0 June 25, 2013 12:19 fisch OpenFOAM Programming & Development 1 June 17, 2011 10:57 Rickard.Solsjo OpenFOAM 0 January 14, 2011 10:44 Joseph CFX 14 April 20, 2010 15:45