defining layers in snappyhexmesh
Hi, I've been trying to solve this problem for a while now but I'm stuck.
With Solidworks I made an airfoil, exported it as .stl and meshed it with snappyhexmesh. Flow calculations etc. work fine but now I'd like to add a suction area. Here lies my problem as I can't figure out how to define that area in snappyhexmesh. I studied the motorbike case what is doing exactly what I want (I think) adding layer-names. Though I don't quite understand how they do it. I would really appreciate it if someone could help me out here, Kind Regards, Leon |
How I understand your post is, that you would like to have a certain volume around the suction side of your airfoil to be refined? A fairly easy way is to split the STL into two parts, both stored in the same STL. Then you can use the distance refinement of the refinementRegions, where you have to specify refinement levels and distances in normal direction of the foil's surface.
|
Hi Jens thank you for your reply,
Let me try to explain again what my problem is; I have a solid (volume is you wish) in .stl and I'd like to assign different value's to a part of its surface. To do that I think I have to apply a different patch(surface) name to that area (am I right?). In the Motorbike case, didn't understand how they did it. You are suggesting I split the surface (I have done that, say I have a cilinder I've cut a pie part out of it with the area on the outside that I need). And then put them in the same STL file. Will that allow me to define two surface names? So it should look like this then? solid name facet normal ni nj nk outer loop vertex v1x v1y v1z vertex v2x v2y v2z vertex v3x v3y v3z' endloop endfacet endsolid name solid name2 facet normal ni nj nk outer loop vertex v1x v1y v1z vertex v2x v2y v2z vertex v3x v3y v3z' endloop endfacet endsolid name2 If this works, will the force/lift calculations still be correct as there you have to specify the surface it monitors? Thanks in advantage, Leon |
Your aim is to have the force calculation separated for the suction and pressure side of the airfoil? Then you really should split the stl file into a suction and pressure side part and then hand both patch names to the forces functionObject in your controlDict. You are on the correct way, by storing to parts in the ascii stl file. The naming convention in snappyHexMesh is the following:
Jens |
For the forces I meant it the other way around, I still want the forces etc from the whole foil, not just the one surface;
Quote:
Thanks again, I'll try running it later on today :) Leon PS. While we are on the subject, I'm currently using RAS kEpsilon, but my lift coefficients are a factor 10 as high as I'd expect, do you have any suggestions on that too? For my LiftDir I used: liftDir (-4.01 5.736 0); This vector is not 1, is that a problem? |
You can add as many patches to the forces functionObject, as you like. I usually use a version of the forces, that has been derived from the original ones, but I have never used the forceCoeffs. To investigate the your force coefficients issue, you can change the magnitude of your liftDir vector (although it should be normalized inside the code) and you could have a look into the respective sources.
|
The combining of the two .stl files worked perfectly. I can now add different boundary conditions to both surfaces. Now I have another problem maybe you can help me with.
My simulation fails after Time =474.5 (with 0.5 steps) everything seems to stabilize and then suddenly my bounding k, value's blow up and go through the roof! I'm not that experienced with linux so debugging is a bit hard. (http://openfoamwiki.net/index.php/HowTo_debugging) Can someone allready see what my problem is? Quote:
Thanks again! |
I suppose, you've chosen your time step not to suffice the CFL condition.
|
I am using simpleFoam.
(using Descretizer so I get a graphic interpretation of what I'm actually doing) |
I've seen that in the meantime ;), but what is your Courant number? You'll have to provide the log of the last time steps.
|
Where can I find that log?
|
Sorry, I haven't used the Discretizer. I usually operate from the console and pipe the output of the solvers to a file. Try to execute
Code:
simpleFoam > log & |
apparently paraFoam screwed up my logfile as it's empty, I will run another simulation to generate a new log file, but for that one do you have any sugestions on my boundary layer problem?
I see several options, what is the best? - specify the boundary as a velocity - specify it as a wall with a velocity set to it - specify it as an outlet (but not sure how to do that with a velocity set to it) Can I call on the simpleFoam simulation and make it write a logfile at the same time? |
Sorry but I've never used the Discretizer before and cannot give you any hints on how to use it. What I can tell you is, that if you start the solver from the command line and pipe the output into a file, you can examine it afterwards.
If you could provide some information on your case setup, we might be able to help you.
|
2 Attachment(s)
You misunderstood me there, Discretizer is more of an aid as it has limited functionality. For specific functions I still need to edit the filed to my wishes. My boundary problem was therefore more of a general question but I'll try to explain my setup more clearly.
I use: Simplefoam Code:
Selecting incompressible transport model Newtonian I attached the log file (last part as it was too large starting with a stable out put (like the 100 before that) to the part were it escalates), and a picture of my setup (forgot to add a legend). The flow has an AOA of 35degr to the foil and a magnitude of 10 m/s. Boundaries are: Code:
dimensions [0 1 -1 0 0 0 0]; I hope this gives you a general idea of what I'm trying to do. Hope this helps! Leon EDIT: forgot to add the error part that apparently doesn't get stored in the log itself Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so" |
Hi,
I really don't think, that your crash is a purely mesh related issue. The output of checkMesh is ok? Why do you apply this velocity to the suction side of our stl? How are your pressure and turbulent properties boundary conditions defined? What discretisations (in system/fvSchemes) do you use? |
A lot of info here, to answer your question first:
I apply a velocity on my stl suction side because I want to suck air into the stl shape at a certain velocity. I'm not quite sure how else to do that. (I don't know a pressure, I'd like to get that from my simulation) Most value's are set automatically by Discretizer after I specified my stream boundaries. First a checkMesh, what does the highly skew faces mean? Code:
leon@ubuntu:~/OpenFOAM/leon-1.7.1/run/35degr$ checkMesh U Code:
FoamFile Code:
FoamFile Code:
dimensions [0 2 -3 0 0 0 0]; Code:
dimensions [0 2 -2 0 0 0 0]; Code:
dimensions [0 2 -1 0 0 0 0]; FvSchemes Code:
FoamFile Leon |
You will have to spend some more work on your mesh, as checkMesh says: "Failed 1 Mesh checks" and you will not be able to obtain any valid results on such a mesh. Visualise the skewFaces and try to get rid of them.
|
Ok thanks, I'll look in to that! as for the velocity on my stl suction side. Do you think that my approach is valid? Can I simulate it this way?
|
Should there be an outlet on the suction side of the stl in reality, or do you want to simply calculate the flow around your shape? If the latter is the case, then don't apply that velocity to your suction side.
|
All times are GMT -4. The time now is 07:07. |