Physical Units & BC

General discussion about Elmer
Post Reply
ramonbarrio
Posts: 4
Joined: 17 Jan 2020, 07:59
Antispam: Yes

Physical Units & BC

Post by ramonbarrio »

Hello.
I'm trying to simulate the gas flux inside a rectangular box, with an inlet and an outlet, in Elmer (meshes in gmsh and post in paraview).
I have a doubt concerning the proper setting for the boundary condition in my simulation: I want the inlet pipe to have a 'forced' flow inward, and the outlet pipe to be set 'free', I mean, open, subjected to atmospheric pressure. What is the proper way of setting this BC?
I've uploaded to a file in Google Drive the .sif I've been using to get the results, as well as the .geo and .msh files which I meshed using Gmsh. The results are in .vtu, which I open in Paraview.

I'd also like to clear something up: given that every constant and equation in the .sif file are written in SI units, may I conclude that the values in the plots I get in Paraview are also in SI units? And yet, if they are: what kind of scale is pressure given in, since it ranges over negative values too?

Image
The picture shows the pressure scale I get in post.

All the necessary files are in said file : run

Code: Select all

sudo chmod +x runtrans.sh
then

Code: Select all

./runtrans.sh 
to run the simulation. It generates the meshes, given they are in the same paste.

Thanks in advance.
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Physical Units & BC

Post by kevinarden »

The way you have done it looks fine to me. I am running it now to look at the results. A velocity at the inlet normal to the face of an inlet with the correct sign into the fluid causes a forced flow. At the outlet you leave the direction of desired flow free, i.e. no specification and Elmer calculates it.

You could specify pressures instead of velocities, but you would want to set initial conditions to clarify what the pressures are relative to.

Elmer itself does not have specific units, unless you include the constants, or use the standard material library, they are in SI. Once you have some items in SI it is best to keep it all in SI, the SI unit for pressure is Pascals (PA).

Pressures can be negative, relative to your reference pressure/initial condition. If you want absolute pressures, then you may consider setting initial condition pressures, and boundary condition pressures.
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Physical Units & BC

Post by kevinarden »

The velocity appears to be high for the mesh density, time step size, and use of the only the stokes equation. The flow is going to be turbulent, which is a struggle. You will either have to slow it down or look at turbulent flow models.

viewtopic.php?f=3&t=6995
velocity.png
(473.62 KiB) Not downloaded yet
kevinarden
Posts: 2312
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Physical Units & BC

Post by kevinarden »

https://github.com/mrkearden/gas
velocity.png
(36.88 KiB) Not downloaded yet
pressure.png
(27.01 KiB) Not downloaded yet
Post Reply