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

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

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By sharonyue
  • 1 Post By sharonyue
  • 2 Post By Martin80

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2013, 00:19
Default Ueqn.A() extract the diag. term from the Ueqn??
  #1
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
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<scalar> 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<vector> 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.
sharonyue is offline   Reply With Quote

Old   July 4, 2013, 06:40
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
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.
sharonyue is offline   Reply With Quote

Old   July 24, 2013, 12:08
Default
  #3
Member
 
Join Date: Aug 2010
Posts: 31
Rep Power: 16
Martin80 is on a distinguished road
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.
Martin80 is offline   Reply With Quote

Old   July 24, 2013, 12:12
Default
  #4
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by Martin80 View Post
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!
sharonyue 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
adding dispersion force term in UEqn leads to oscillations of velocity field sr_tenedor OpenFOAM Programming & Development 2 June 6, 2014 07:59
Adding an explicit source term in the UEqn() Anne Lincke OpenFOAM Running, Solving & CFD 0 June 25, 2013 13:19
Source term problem in UEqn of simpleFoam fisch OpenFOAM Programming & Development 1 June 17, 2011 11:57
Extract momentum source term Rickard.Solsjo OpenFOAM 0 January 14, 2011 10:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45


All times are GMT -4. The time now is 23:43.