Boundary Layer Does Not Form - Except When Default Settings Used

I thought I would go ahead to try simulating with the mesh I got at 13 layers… just to see how it goes. But my simulation is blowing up. Just wanna ask a few questions to make sure it is not blowing up because I am setting something wrong (i.e. it is due to poor mesh quality):

  1. I followed pretty much what I can see from FiliptheKing’s.
  2. I did amend the air density and viscosity to represent the design conditions of the propeller (eg. flight altitude)
  3. Now, for the pressure setting in the initial conditions, it is a gauge pressure, which I understand to mean it references another setting. This setting, I thought to be “Pressure reference value” under Numerics. However, I saw this to be set to 0 Pa for FiliptheKing’s. Should this be the flight altitude pressure? And then the initial condition (gauge) pressure value will be 0 Pa.
  4. For pressure outlet, I set it as 0 Pa.

Does these sound about right? Most wanted to clarify #3.

Thanks!

Hi @cweisheng,

Which simulation are you referring to?

Yes, all 0 is fine. There is no need to indicate this for a simple incompressible simulation.

Cheers.

P.S Realized you’re from Singapore, I am too so hello!

@Get_Barried, good to link up since we are countrymen! That’s rare too!

I might have made some headway though still not 100% applicable. I decided to use a high density STL to try (previously was using IGES).

This is the result I got for my “ideal” mesh:
patch faces layers overall thickness
[m] [%]


solid_0_stl_solid 293784 10 0.000309 93.1

The problem with using STL is that I was only able to generate the propeller geometry and not the surrounding volume for MRF. Haven’t got around to trying… does anyone know if I can use a geometry primitive for the surrounding volume for MRF, AND one for the outer farfield boundaries?

Thanks.

Hi @cweisheng,

Looks pretty good. I’ve been exploring cfMesh and attempting to mesh the other topic where Dale and others were discussing. That geometry is giving me issues so I think I will move on yours and attempt to run it through cfMesh to see if I can get a better quality.

I don’t believe you can use the geometry primitive. Not exactly sure though. I’ve always generated my MRF volume through CAD.

As for the outer farfield boundaries, that should be possible as it is effectively just the bounding box.

Cheers.

Regards,
Barry

Thanks @Get_Barried.

Alright, so the mesh from the STL really does look good after I did a couple more cross-sections. However, this is infuriating as I am trying to do a MRF and so I need another volume around it for the MRF. After experimentation, I do need this volume to be imported together in the CAD, which unfortunately 2 solids, with 1 inside the other, is not compatible with STL! ARGH.
@jousefm or anyone at SimScale able to help here???!

I did another based on STEP geometry, it was good too but not as good as the STL one. i.e. the prism layers did not form as comprehensively as the STL one.

So, it seems for me, in terms of prism layer formation percentage
STL > STEP > IGES
for imported CAD geometry format. Will post some pictures tomorrow.

@cweisheng: I use near exclusively STL for my geometries, 80% of them have defined MRF volume, rotor, propeller or whatever being inside and never had problem with it. Why it would be incompatible, please?

Cheers,

Retsam

Hi @Retsam

Great to find a relevant expert!

I guess I would like to ask which CAD software you are using, and how do you export both geometries, the rotor and the MRF volume as one STL (or not, and if not, how do you import and work into SimScale)? Would it be possible to share your workflow in some detail? I am sure it is just my ignorance.

Thanks!

Hi both,

I would be interested to know the workflow for generating a MRF volume in STL as well. Snappy and cfMesh both prefer the STL format (though cfMesh does like another format called fms) so knowing how to generate it would be great.

Looking forward to your reply.

Cheers.

Regards,
Barry

@Get_Barried and @cweisheng: take a look at one of geometry I use in Magnus effect Project:

Geometry: CylRotSlim
Simulation: CylRotMenium

Geometry contains ‘solid_0’ composed with ‘ascii’ and ‘ascii_1’ bodies. MRF zone definition is as near as possible to rotating body.

I did filetted the edges to avoid high gradients with air moving (shear) in standing still air (whole BMB).

Now, I did it in Fusion, with ‘export’ to STL. This is old Fusion and I cannot tweak the resolution of STL mesh there.

@cweisheng you can export / import that geometry to you CAD tool and see how your CAD will handle those bodys. Switch the visibility of one or another, you should be able to handle it without problem.

Cheers,

Andrzej

1 Like

I said I used Fusion, but I prepare to use OnShape. My first test with STL shows, that OnShape merges parts.

  facet normal -1 0 0
    outer loop
      vertex 0.00169513 0.0397737 0.014
      vertex 0.00169513 0.0397737 0.03
      vertex 0.00169513 0.0505397 0.03
    endloop
  endfacet
  facet normal -0.956526 0.267466 0.116272
    outer loop
      vertex -0.0401284 -0.00153045 0.0202347

Above, second element ‘Facet normal’ belongs to another part.

First part stops with first ‘Facet normal’ element.
There is no name attribute to separate both parts. So possibly no way to discover different parts while parsing that text file. Too bad. :spider:

You can export those parts in separate files: final format is in ZIP. Than I would need to write a script to merge those parts in one STL file, with elements attributes indicating different names.

The current work around to STL file merging intersecting geometry is simply concatenate them (text files). You can also , in text editor, edit name of the solid;

solid Blurb
  facet normal 1.632797e-002 -1.240232e-001 -9.921450e-001

Above I replaced ‘ascii’ with ‘Blurb’. Simscale will respect it. If all solids are named ‘ascii’, Simscale will increment the name with ‘_1, _2, …’. :man_student:

2 Likes

That sounds very smart! I guess what you are saying is to combine 2 STL files, each with 1 of the Solids…

Ok, I just need to find out how to do that as I am not familiar with the process you mentioned. But thanks!

Edit:

  • awesome. previously i was saving as binary so the file was not readable. but i saw the ascii option and that is readable (in notepad++)
  • so i did as i think you meant, i appended one file (with one solid) to the other (with the other solid) and renamed them
  • i checked them in Fusion and I do see 2 bodies
  • I imported them into SimScale - it was one solid but 2 i-dont-know-what (faces?) that i was able to select for meshing based on mrf and propeller. it’s meshing now… so fingers crossed. still, great hack! will update if it works.
1 Like

Great! Notepad++ is the best for manual concatenations of text files. By the way: MRF zone should be really in the vicinity of the propeller. Do not make it too big.

If it is a solution for your problem, please indicate it were appropriate.

Cheers,

Retsam

1 Like

Hey guys!

I have posted 2 scripts a while ago to merge STL’s that you can find here: Merging STL files - #2 by jousefm

Best,

Jousef

3 Likes

Hi all, so yes, this post is to confirm that using STL exclusively seems to result in higher prism layer formation! Thanks again @Retsam

Details:

  1. Objective of my current exploration was to conduct MRF simulation on propeller to see how well SimScale predicts the thrust and torque characteristics. Before I can do that, a decent simulation mesh needs to be generated and this post was a result of problems encountered at this stage.

  2. As you would read above, there were several problems along the way, perhaps due to my inexperience with OpenFoam and SnappyHex. All along, I was working with IGES files and the best prism layer formation was about ~70% I would say (optimistically). I have tried both y+=1 and y+=100 types, 5 layers to >10 layers etc since the cause of the problems were not clear.
    image

  3. Y+=1 mesh will be something like:
    Layer1------3.40E-06m
    Layer2------4.42E-06m
    Layer3------5.75E-06m
    Layer4------7.47E-06m
    Layer5------9.71E-06m
    Layer6------1.26E-05m
    Layer7------1.64E-05m
    Layer8------2.13E-05m
    Layer9------2.77E-05m
    Layer10----3.61E-05m
    Layer11----4.69E-05m
    Layer12----6.09E-05m
    Layer13----7.92E-05m
    Layer14----1.03E-04m
    Layer15----1.34E-04m
    Layer16----1.74E-04m

  4. After almost giving up, and with very few options left (haven’t tried cfmesh as I don’t think my laptop has enough RAM), I just thought of trying STL. But I was not able to import 2 solids in 1 file if I directly output from Autodesk Fusion360. Nevertheless, the prism layer formation was >90% for meshing without the MRF volume.

solid_0_stl_solid 293784 10 0.000309 93.1

Aside: Using STEP file, the formation was ~70+%.

A1_I1541_B2_TE141_A1_I1541_B2_TE43 193864 7.83 0.000262 78.9
A1_I1541_B2_TE141_A1_I1541_B2_TE50 277 0.17 1.3e-05 3.93
A1_I1541_B2_TE141_A1_I1541_B2_TE53 2524 1.19 4.62e-05 13.9
A1_I1541_B2_TE141_A1_I1541_B2_TE124 193794 7.83 0.000262 79
A1_I1541_B2_TE141_A1_I1541_B2_TE131 277 0.17 1.3e-05 3.93
A1_I1541_B2_TE141_A1_I1541_B2_TE134 2523 1.19 4.62e-05 13.9

  1. Luckily @Retsam replied my distress call on STL and I managed to combine 2 STL files by exporting them in ASCII format and copying and pasting one STL file to another using Notepad++. Great idea! You will have something like that:

solid PROPELLER [this is the 1st STL file]
facet normal -8.195655e-01 5.663210e-01 8.713685e-02
outer loop
vertex -1.877391e+01 1.240122e+01 8.000000e+00
vertex -1.874856e+01 1.238448e+01 8.347296e+00
vertex -1.796457e+01 1.354920e+01 8.151286e+00
endloop
.
.
.
endsolid
solid MRFVOLUME [this is the pasted-in 2nd STL file]
.
.
.
endsolid

And then save as “All Files” with the .STL extension. Then proceed to import into SimScale.

  1. With the MRF volume inside too, it works! Again, >90% of the prism layers generated:

solid_0_PROPELLER 297213 9.97 0.000308 92.7

I used very fine tessellation on the propeller (and reminder to self to scale down by 0.001 to work in m).

Now, I can finally run the simulation knowing that I have a decent mesh. Hopefully.

Thanks @DaleKramer, @Get_Barried and @Retsam for the help.

3 Likes

Your welcome! However credits should go to @Get_Barried, @anirudh2821998 as topic is about meshing. I simply took a look at STL file handling, which is nothing compared to meshing complexity! :man_student:

Different geometry, same problem (if not worse). Now, even the high y+ mesh PL is problematic (0.2% formed), following all the previous settings and tricks.

SimScale sales contacted me to ask about converting to Professional plan… no news heard after I shared the pain points.

Problematic indeed.

Any significant differences between the new geometry and original working geometry?

Jousef, I wanted to confirm, exporting as STL instead of importing directly fom Onshape is still the recommended path? It would be great if Simscale did this by itself :wink:

That’s IMHO one of the best ways to go. What would you recommend, can you be a bit more explicit?

Feel free to add your request in this section: Feedback Section

Best,

Jousef