
[Sponsors] 
September 13, 2020, 15:07 
Running a test

#1 
New Member
Ra Miro
Join Date: Aug 2020
Posts: 21
Rep Power: 4 
Hello.
I executed some tutorials, and now I try to run my own test. I have tried to understand why it does not run, but I can't understand it. It is a fluid (NavierStokes) in a curved tube. There are "inlet", "outlet" and "walls" faces. I made the mesh in salome. I'm trying to use icoFoam. I tryied to use OpenFoam 8 and foamextend 4.0 and 4.1 versions. Are there differences when implementing the same example in these differents OpenFoam versions? I'm new in OpenFoam world, and I'm trying my best to learn how to use it. Modifying somethings appears different errors, that's why I think could be easier to detect the error sharing my codes with you to understand where is the error. https://www.dropbox.com/s/hvys04778v...tpipe.zip?dl=0 Thanks in advance. 

September 14, 2020, 08:53 

#2 
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 63
Rep Power: 6 
Hi,
First things first, please try to provide to the community a snippet of the errors that you get using the code tags. Usually, errors are selfexplanatoty, especially in the beginning of your OpenFOAM experience. Also, as a beginner do not try to build a case from scratch. Instead, use the tutorials that come with every OpenFOAM branch that you wish to use. From a quick look at your case:
I suspect that you tried to follow the cavity case but you didn't notice that the boundaries are walls and not patches as in your case. I hope that the above info will help getting you started. Best, Petros 

September 16, 2020, 01:10 

#3 
New Member
Ra Miro
Join Date: Aug 2020
Posts: 21
Rep Power: 4 
Thanks petros, you are right, the files were in wrong place, and also I'm editing the cavity example for my problem. Since I'm new in the OpenFoam world, I really appreciate your support.
Now I'm running a simpler test as before: a straight cylinder example with circular base (without using any symmetry). 1. I read that icoFoam is just for laminar fluid, Can I use it for transient or turbulent fluid? My question is, icoFoam solves the following NavierStokes equations or I must to be careful with some assumption? in in (plus boundary conditions) 2. I separated the noninterior faces in three groups: "inlet", "outlet" and "walls" ("walls" are the noninterior faces that are not inlet nor outlet). For the outlet I want to impose Neumann boundary condition, that I know are This is the typical Neumann boundary condition that appears in Finite Element method, and may be here, as OpenFoam uses Finite Volume Method, is not the same. As I not see how to implement this boundary condition in the tutorials, I would like to be sure that I'm doing it right. The data in my input files are: 0/p: Code:
/** C++ **\ =========  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox \\ / O peration  Website: https://openfoam.org \\ / A nd  Version: 8 \\/ M anipulation  \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0.02; } outlet { type fixedValue; value uniform 0.0; } walls { type zeroGradient; } } // ************************************************************************* // Code:
/** C++ **\ =========  \\ / F ield  OpenFOAM: The Open Source CFD Toolbox \\ / O peration  Website: https://openfoam.org \\ / A nd  Version: 8 \\/ 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); boundaryField { inlet { type pressureInletVelocity; value uniform (0 0 0); } outlet { type zeroGradient; } walls { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // 3. I'm trying to implement a Poiseuille flow. Do you think I did well? and . 

September 16, 2020, 14:00 

#4 
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 63
Rep Power: 6 
1. icoFoam is for incompressible, laminar and transient flows of Newtonian fluids so it doesn't handle turbulence.
2. The Neumann boundary condition is a fixedGradient. As for your case, you have correctly chosen the fixedValue BC, which is a Dirichlet BC. Just to remind you that the Neumann BC in OpenFOAM is: where is the facetocell distance. 3. In incompressible solvers the pressure is the kinematic pressure measured in because we devide by the density. Your values are correct only if your fluid is water with an assumed density of . Best, Petros 

September 17, 2020, 13:34 

#5 
New Member
Ra Miro
Join Date: Aug 2020
Posts: 21
Rep Power: 4 
Thank you very much. I hope not to abuse your patience to continue clarifying certain doubts.
1. Thanks ! 3. Yes it is, I'm running tests where I can compare known solutions to understand how OpenFoam works. 2. About Neumann boundary conditions, I come from the "Finite Elements" world, where the Neumann boundary condition are: I don't know if it is an abuse to ask you to explain (or send me a link) to learn how this relates to OpenFoam's implementation of Neumann conditions, I mean, the numerical algorithm inside. If you think it is too much (or require an answer to long), you may not aswer this question. I have some little questions too: Question A:  For the pressure: inlet { type fixedValue; value uniform 0.02; } For me this is ok, because we have impose a fixed value for the inflow pressure But, for the velocity inlet { type pressureInletVelocity; value uniform (0 0 0); } What the "value uniform (0 0 0 );" means? I'm fixing the inlet velocity value to cero? Is this ok? Furthermore, for the velocity: outlet { type zeroGradient; }  I suppose that the "zeroGradient" for the outlet velocity is related with the Neumann boundary condition. If is the Neumann boundary condition, because we are supposing that the fluid is fully development?  Question B: For me, it is natural to impose velocity equal to zero in the walls, but, why we can (or must) impose the "zeroGradient" for the pressure? walls { type zeroGradient; } 

September 18, 2020, 16:07 

#6  
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 63
Rep Power: 6 
The implementation of the Neumann boundary condition in OpenFOAM can be found here. You may also want to have a look at the respective source code here.
Quote:
Quote:
Quote:
I hope my comments were helpful. Best, Petros 

September 22, 2020, 00:30 

#7 
New Member
Ra Miro
Join Date: Aug 2020
Posts: 21
Rep Power: 4 
Thanks petros for your huge patience. I'm analyzing your answer.
I feel that I have a lot to learn about the software, and your guidance is very useful. 

Tags 
foamextend 4.0, navier stokes equations, pipe flow 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Error problem while running sadia d lts tutorial  kane  OpenFOAM Running, Solving & CFD  2  May 26, 2018 04:38 
XiFoam Non reactive test case  Stefano Puggelli  OpenFOAM Running, Solving & CFD  1  July 9, 2015 03:24 
A new test harness for OpenFOAM  mbeaudoin  OpenFOAM Announcements from Other Sources  0  June 17, 2010 11:36 
critical error during installation of openfoam  Fabio88  OpenFOAM Installation  21  June 2, 2010 04:01 
Running test  nt31921a  OpenFOAM Installation  2  May 9, 2010 00:48 