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

probably a simple error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2017, 17:00
Default probably a simple error
  #1
New Member
 
Adam Katz
Join Date: Feb 2017
Posts: 23
Rep Power: 9
Adamkat is on a distinguished road
Hi all,
I am trying to simulate heavy gas flow into my domain. The problem is I don't get any in flow velocity?!
I suspect it is either wrong boundary conditions or wrong mesh/patches.
Please help, I have no idea how to advance.
Thanks,
Adam

I am using rhoReactiveBuoyantFoam

Here are my /0 files:

U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    gasInlet
    {
        type            fixedValue;
        value           uniform (0 -1 0);
    }


    gasOutlet
    {
        type            pressureInletOutletVelocity;
        value           $internalField;
      //  phi             phi;
    }
    frontAndBack
    {
        type            empty;
    }
p_rgh
Code:
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 1e5;

boundaryField
{
    gasInlet
    {
        type            zeroGradient;
    }
    gasOutlet
    {
        type            totalPressure;
        p0              $internalField;
        U               U;
        phi             phi;
        rho             rho;
        psi             none;
        gamma           0;
        value           $internalField;
    }
    frontAndBack
    {
        type            empty;
    }
N2
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0.5;

boundaryField
{
    gasInlet
    {
        type            fixedValue;
        value           uniform 0.0;
    }
    gasOutlet
    {
        type            inletOutlet;
        inletValue      uniform 1.0;
        value           uniform 1.0;

    }
    frontAndBack
    {
        type            empty;
    }
SF6 //the heavy gas
Code:
dimensions      [0 0 0 0 0 0 0];

internalField   uniform 0.5;

boundaryField
{
    gasInlet
    {
        type            fixedValue;
        value           uniform 1.0;
    }
    gasOutlet
    {
        type            inletOutlet;
        inletValue      uniform 0.0;
        value           uniform 0.0;
    }
    frontAndBack
    {
        type            empty;
    }

Perhaps it has something to do with the geometry so I attached a picture of the domain.
blockMeshDict:
Code:
convertToMeters 1;

vertices
(
                      // bottom box
    (0.0  -0.1 -0.01) //0
    (0.2 -0.1 -0.01)  //1
    (0.2  0.1 -0.01)  //2
    (0.0   0.1 -0.01)  //3
    (0.0  -0.1  0.01)  //4
    (0.2 -0.1  0.01)  //5
    (0.2  0.1  0.01)  //6
    (0.0   0.1  0.01)// 7
                     // top part
                     //center
    (0.09 0.1 -0.01) //8
    (0.11 0.1 -0.01) //9
    (0.11 0.16 -0.01) //10
    (0.09 0.16 -0.01) //11
    (0.09 0.1 0.01) //12
    (0.11 0.1 0.01) //13
    (0.11 0.16 0.01) //14
    (0.09 0.16 0.01) //15
                    // corners
    (0 0.16 -0.01) //16
    (0.2 0.16 -0.01) //17
    (0 0.16 0.01) //18
    (0.2 0.16 0.01) //19
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (100 100 1) simpleGrading (1 1 1) //bottom box
    hex (8 9 10 11 12 13 14 15) (10 30 1) simpleGrading (1 1 1) //center top box
    hex (3 8 11 16 7 12 15 18) (45 30 1) simpleGrading (1 1 1) //left top box
    hex (9 2 17 10 13 6 19 14) (45 30 1) simpleGrading (1 1 1) //right top box);
);
edges
(
);

boundary
(
  gasInlet
      {
          type patch;
          faces
          (
            (10 11 14 15)
          );
      }

  gasOutlet
  {
      type patch;
      faces
      (
          (4 7 3 0)
          (7 18 16 3)
          (1 2 6 5)
          (2 17 19 6)
          (0 1 5 4)
          (17 10 14 19)
          (11 16 18 15)
      );
  }
  frontAndBack
  {
      type empty;
      faces
      (
          (4 5 6 7)
          (13 6 19 14)
          (12 13 14 15)
          (7 12 15 18)
          (0 3 2 1)
          (10 17 2 9)
          (11 10 9 8)
          (16 11 8 3)

      );
  }
);

mergePatchPairs
(
);
Attached Images
File Type: png Selection_041.png (15.9 KB, 11 views)
Adamkat is offline   Reply With Quote

Old   August 9, 2017, 04:09
Default
  #2
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
I'm guessing that having an inlet and an outlet directly adjacent to each other like that is a bad thing numerically.

I know from interFoam that in order to have an inlet next to a wall in the same geometry that you are using, I require to add some sort of tube or nozzle-like geometry on top of the inlet, such that the inlet is not directly adjacent to the wall, e.g.:
Code:
  inlet
    __
   |  |
___|  |___
floquation is offline   Reply With Quote

Old   August 9, 2017, 04:20
Default Thanks, will try and update
  #3
New Member
 
Adam Katz
Join Date: Feb 2017
Posts: 23
Rep Power: 9
Adamkat is on a distinguished road
Thanks man!
I'll try and update.
Adamkat is offline   Reply With Quote

Old   August 10, 2017, 00:17
Default
  #4
Member
 
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17
kcjarvis56 is on a distinguished road
The mesh has some empty faces on the inside specifically (7 3 8 12) (12 8 9 13) (13 9 2 6). Try the below block mesh.

Code:
convertToMeters 1;

vertices
(
	(0 -0.1 -0.01) //0
	(0.09 -0.1 -0.01) //1
	(0.09 0.16 -0.01) //2
	(0 0.16 -0.01) //3
	(0 -0.1 0.01) //4
	(0.09 -0.1 0.01) //5
	(0.09 0.16 0.01) //6
	(0 0.16 0.01) //7
	(0.11 -0.1 -0.01) //8
	(0.11 0.16 -0.01) //9
	(0.11 0.16 0.01) //10
	(0.11 -0.1 0.01) //11
	(0.2 -0.1 -0.01) //12
	(0.2 0.16 -0.01) //13
	(0.2 0.16 0.01) //14
	(0.2 -0.1 0.01) //15

);

blocks
(
	 hex (0 1 2 3 4 5 6 7) (45 130 1) simpleGrading (1 1 1)
	 hex (1 8 9 2 5 11 10 6) (10 130 1) simpleGrading (1 1 1)
	 hex (8 12 13 9 11 15 14 10) (45 130 1) simpleGrading (1 1 1)

);

boundary
(
	gasInlet
	{
		type	patch;
		faces	
		(
			(2 6 10 9)
		);
	}
	gasOutlet
	{
		type	patch;
		faces	
		(
			(9 10 14 13)
			(12 13 14 15)
			(8 12 15 11)
			(1 8 11 5)
			(0 1 5 4)
			(0 4 7 3)
			(3 7 6 2)
		);
	}
	frontAndBack
	{
		type	empty;
		faces	
		(
			(4 5 6 7)
			(5 11 10 6)
			(11 15 14 10)
			(8 9 13 12)
			(1 2 9 8)
			(0 3 2 1)
		);
	}
);

edges
(
);
kcjarvis56 is offline   Reply With Quote

Old   August 10, 2017, 04:38
Default
  #5
New Member
 
Adam Katz
Join Date: Feb 2017
Posts: 23
Rep Power: 9
Adamkat is on a distinguished road
Dear Kirk,
The mesh you propose is much more elegant than mine, yet I don't understand why these empty faces pose a problem?
Also, if I take Floquation's advice I will have this kind of "empty face" (8 12 13 9) in the nozzle-chamber interface (see figure).

Could you please explain?
Thanks

BTW I found an awesome way to display the blocks and vertices using
Code:
paraFoam -block
PS I also attached your mesh suggestion for the convenience of the readers.
Attached Images
File Type: png Selection_045.png (11.8 KB, 7 views)
File Type: png Selection_044.png (10.1 KB, 6 views)
Adamkat is offline   Reply With Quote

Old   August 10, 2017, 10:57
Default
  #6
Member
 
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17
kcjarvis56 is on a distinguished road
On the mesh I provided you could add the four point above (2 6 10 9 ) and make a new Hex for the nozzle.

Sent from my SM-N920V using CFD Online Forum mobile app
kcjarvis56 is offline   Reply With Quote

Old   August 10, 2017, 11:22
Default
  #7
Member
 
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17
kcjarvis56 is on a distinguished road
See how the hexs share points. There are ways to mesh the faces or extrude the faces however off the top of my head this is easier and doesn't require extra steps and in my opinion is a fundamental you should learn if plan on using openfoam.

Sent from my SM-N920V using CFD Online Forum mobile app
kcjarvis56 is offline   Reply With Quote

Old   August 10, 2017, 11:35
Default
  #8
Member
 
Kirk Jarvis
Join Date: Mar 2009
Posts: 31
Rep Power: 17
kcjarvis56 is on a distinguished road
Look up mergePatchPairs in the user-guide. That might do it also if I remember right. You would define the two faces that you are connecting. In the blockMeshDict.

Sent from my SM-N920V using CFD Online Forum mobile app
kcjarvis56 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
[blockMesh] blockMesh with double grading. spwater OpenFOAM Meshing & Mesh Conversion 92 January 12, 2019 09:00
Ansys Fluent 13.0 UDF compilation problem in Window XP (32 bit) Yogini Fluent UDF and Scheme Programming 7 October 3, 2012 07:24
POSDAT problem piotka STAR-CD 4 June 12, 2009 08:43
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 20:50


All times are GMT -4. The time now is 05:36.