Two weeks ago, I found Tobias Holzmann’s Tesla’s One-Way-Valve. It is great but there is no explaination. So, I write this page to record some troubles I met in it and how I solved it.
The first trouble I met is that the teslaOneWayValveBackup.py
couldn’t find the step file even if I have changed the directory.
I solved this problem by importing the step file to salome and
dumping the study, then copying the required command to
teslaOneWayValveBackup.py. It is interesting that sometimes there
is no difference between changing directory manually and it, but it
do work while the other not.The reality is that I had inputted the wrong address.
The second problem is that when I changed the regionSTL.stl to my
own, it would raise an error that there is no definition for
defaultFaces.
The first situation is that I didn’t set boundary condition. At
first, I just copied a stl file there, which had only one solid. So
I need to set the BCs.
The second situation is that the stl may be not waterproof. At
first I made groups in salome, exported them one by one and then
merged them to one file after adding BC (solid back …). Using surfaceCheck it, I found it wasn’t closed. In this case, snappyHexmesh generated an extra defaultFaces boundary. To solve it, I also do these above, but take notice that when make group, the main shape should be the whole object.
The proceduare is like this:Geometry ->import step
New Entity -> Explode (explode the step object)
New Entity ->create group (set the boundary condition)
export stl one by one
edit and merge
runUp to now I just succeeded one time, maybe it is correct.
Finally I gave up. I use gmsh or Salome to mesh it and set boundary
conditons. It is easy to use gmsh. So I want to note how to mesh in
Salome.Geometry ->import step
New Entity -> Explode (explode the step object)
New Entity ->create group (set the boundary condition)
Mesh ->Create Mesh , choose NETGEN-1D-2D-3D
Create Group from Geometry
Compute
Export Mesh as UNV file
ideasUnvToFoam
edit the boundary
pimpleFoam