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

Filling of a basin

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By ssa_cfd
  • 1 Post By obscureed
  • 1 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 28, 2018, 17:17
Default Filling of a basin
  #1
New Member
 
David
Join Date: Oct 2018
Posts: 27
Rep Power: 7
Fool is on a distinguished road
Hello all,

I need to simulate the filling process of a basin under atmospheric conditions. I guess it's really not that difficult but as a beginner I do not really progress.

I've built a simplification of my original geometry in FreeCAD and meshed it with gmsh. I chosed the blue sides as inlet and the black walls as wall.
Now that the basin shall get filled with 3m³/s I don't want to define an outlet. But trying to solve it with simpleFoam doesn't work because of the missing outlet it says.
Is it even possible to do a simulation without outlet in simpleFoam and if yes what boundary conditions do I have to select for the outlet?

freecad.JPG

Below I'll post an example of the case I have to simulate. Would be very thankful if someone could give me some specific advices for such a case. I'm really struggling.

Bildschirmfoto 2018-11-28 um 23.13.50.JPG

Tanks a lot
Dave
Fool is offline   Reply With Quote

Old   November 29, 2018, 05:00
Default
  #2
Member
 
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 7
ssa_cfd is on a distinguished road
Try with interFoam.
Fool likes this.
ssa_cfd is offline   Reply With Quote

Old   November 29, 2018, 05:34
Default
  #3
Senior Member
 
Join Date: Sep 2017
Posts: 246
Rep Power: 11
obscureed is on a distinguished road
Hi Fool,


I'm no expert, but here are some thoughts:
1) simpleFoam is a steady-state solver, and yours is a transient situation. You need a transient solver.
2) When the water comes in, the corresponding amount of air must leave (or be compressed). If it leaves, you need an outlet.
3) You have two fluids in your simulation (water and air), so (as far as I know) you need a multiphase solver. Looking at https://www.openfoam.com/documentati...rd-solvers.php, and assuming you don't need (and therefore don't want) compressible effects, I think interFoam looks like something to explore.


Good luck!
Ed
Fool likes this.
obscureed is offline   Reply With Quote

Old   November 29, 2018, 06:02
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Quote:
Originally Posted by Fool View Post
But trying to solve it with simpleFoam doesn't work because of the missing outlet it says.
Is it even possible to do a simulation without outlet in simpleFoam and if yes what boundary conditions do I have to select for the outlet?
Hi Dave,
with most of the OpenFoam solvers it is assume that you numerical domain is filled with water/air/... . E.g. you can define an inlet as a velocity inlet accelerating the water within your domain, but it will allways be full of water. As such it needs an outlet the pressure can be released somewhere and the volume that comes in has to go out somewhere.

Keyword: Navier-Stokes eqn., conservation laws.

Imagine a close cube and you attach a hose to a hole in the top to fill your cube. Remember a OpenFoam cube will allways be filled. Without a release the pressure in your cube would rise unti it bursts at some point.

If you want to simulate the filling of an air-filled domain with water you will need a multiphase solver that can capture the air/water interface.
Fool likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   December 13, 2018, 17:20
Default
  #5
New Member
 
David
Join Date: Oct 2018
Posts: 27
Rep Power: 7
Fool is on a distinguished road
Thanks for your help.

I now tried interfoam and the results are getting better. But I do have a problem with the boundary conditions for my inlet.
In my case the whole basin shall be filled with air at time 0 and after that a constant flow of 3m³/s shall flow into the basin. But the only possibility I see is to set alpha.water=1 for the inlet and U to flowrateinletvelocity with a volumetricflowrate of 3, but then the whole inlet is full of water and it doesn't really rises from the bottom as a flow in reality would do, which I guess is not the perfect solution. I will post the files below (laminar case).

I tried to play around with variableHeightFlowRateInletVelocity and variableHeightFlowRate but then I either get an error message in openFoam or no solution for alpha.water that can be displayed in paraview.

Does anyone know if it is even possible to simulate it as I imagine it and is it maybe more useful to work with a velocity instead of the volumetricflowrate?

And can someone explain me the variableHeightFlowRate condition and what the upper and the lower bound stands for?




/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0.0;

boundaryField
{

wall
{
type fixedFluxPressure;
value uniform 0.0;
}

atmosphere
{
type totalPressure;
p0 uniform 0.0;
}

inlet
{
type fixedFluxPressure;
gradient uniform 0.0;
}

defaultFaces
{
type empty;
}

}

// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0.0;

boundaryField
{

wall
{
type zeroGradient;
}

atmosphere
{
type inletOutlet;
inletValue uniform 0.0;
value uniform 0.0;
}

inlet
{
type fixedValue;
value uniform 1;
}

defaultFaces
{
type empty;
}

}

// ************************************************** *********************** //


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0.0 0.0 0.0);

boundaryField
{

wall
{
type fixedValue;
value uniform (0 0 0);
}

atmosphere
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}

inlet
{
type fixedValue;
value (1 0 0);
}

defaultFaces
{
type empty;
}

}

// ************************************************** *********************** //
Fool is offline   Reply With Quote

Old   December 14, 2018, 03:44
Default
  #6
Member
 
ssa
Join Date: Sep 2018
Posts: 93
Rep Power: 7
ssa_cfd is on a distinguished road
I think the problem is not with boundary conditions, but with the geometry. Instead of selecting whole face as inlet, select only the bottom few cells as inlet using toposet and createpatch and I hope the water will increase from bottom.
ssa_cfd is offline   Reply With Quote

Reply

Tags
basin, filling, simplefoam


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
how to track/view the filling of resin inside a mold using viscid/laminar modelFluent gtuncol FLUENT 0 August 6, 2010 23:49
Mold Filling simulation using VOF model. Nitin Pathak FLUENT 1 August 21, 2009 11:54
FILLING RESTART AMP FLOW-3D 6 December 19, 2008 03:48
Regarding mold filling simulation in Fluent Nitin Pathak FLUENT 0 August 10, 2007 14:19
Filling Pietro Poesio FLUENT 0 March 31, 2000 06:56


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