CFD with FreeCAD!

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Working on a first "real" simulation. I was surprised at how thin the layers at the rocket surface needed to be to get to a y+on the order of 10. I also wasn't very successful in getting multiple polygon mesh refinements to work like you had done. I could get one box inside the main model, plus a "distance form the rocket surface" one to work. Finally, I just love it when residuals do this kind of thing. It is still working, so we'll see what it comes up with. The domain is 1500x1500 with a 100mm-diameter rocket, so we're looking at ~0.4% obstruction.

This solution is blowing up, most likely from the mesh. Are you running steady state, or attempting transient? Residuals really have no meaning in a true transient flow. They will level out and oscillate without dropping orders of magnitude. Your residuals are not doing that, though. Your simulation is all over the place and diverging. (I tried a transient run, and the CfdOF parameters are pretty sparse. Will need to tune the settings in the OpenFOAM dictionaries to get a good blend of accuracy/efficiency.)

Anyway, a nicely converged steady-state solution is feasible. I changed my convergence from 1.0E-03 to 1.0E-04. No troubles.

1710249789502.png
 
I ended up having to abandon the simulation above and model it with a thicker boundary layer. That model was going weird, like drag forces in the range of 1E110 N. I did get it running, and saw the same asymmetry as above. Arrgh. Then inspiration struck and I went looking for a gravity term. Huzzah! I was applying gravity, in the negative Y direction, which would explain airflow appearing to flow down to the left (+Y is up on those views, airflow from the left). So I deleted gravity from the model and got...

Exactly the same flow asymmetry. Double arrgh. You can see that the wake is about even with the top of the body tube on the top of the rocket, and substantially below it on the bottom.

I should probably try a repeat with modeling the entire domain instead of assuming symmetry about centerline. That will double computation time, but maybe there's something weird about the constraint that's messing me up.

On a sanity check, I did see that my domain looks to be a reasonable size. The incoming velocity is 300 m/s, to match the OpenRocket CP calculation of Mach 0.3. At the edges of the domain, the velocities vary less than +/- 1 m/s from that incoming speed.

Yes, turn off gravity.

Mach 0.3 would be about 100 m/s, not 300 m/s. Not sure if this matters in the incompressible solution.

OK, I see your non-symmetry. Could be bad mesh or the solution hasn't run long enough, and nicely enough, to develop the flow.

This is my 8 degree AoA model. There is still nice wake symmetry across the y-axis. Here are velocity slices through the centerline and through the fins.

1710251129563.png1710251031059.png
 
Last edited:
This solution is blowing up, most likely from the mesh. Are you running steady state, or attempting transient? Residuals really have no meaning in a true transient flow. They will level out and oscillate without dropping orders of magnitude. Your residuals are not doing that, though. Your simulation is all over the place and diverging. (I tried a transient run, and the CfdOF parameters are pretty sparse. Will need to tune the settings in the OpenFOAM dictionaries to get a good blend of accuracy/efficiency.)

Anyway, a nicely converged steady-state solution is feasible. I changed my convergence from 1.0E-03 to 1.0E-04. No troubles.

View attachment 635078
Yeah, that was the set of residuals from the run that I stopped because the forces were getting weird. I changed the thickness of the boundary layer cells and it was much more like yours.
Yes, turn off gravity.
I just hadn't seen that switch in the inputs...
Mach 0.3 would be about 100 m/s, not 300 m/s. Not sure if this matters in the incompressible solution.
Arrgh again. Gotta go check my math. Running it in incompressible flow at M0.9 probably makes for weirdness.
OK, I see your non-symmetry. Could be bad mesh or the solution hasn't run long enough, and nicely enough, to develop the flow.
Since it's been persistent every time I've used the model split on CL with a symmetry constraint and one of the instruction videos said that they'd had trouble with the symmetry constraint, I'm thinking that's what it is. I'll try the bigger model and see what happens. I also likely ned to add some mesh refinement right at the aft end of the rocket. The wake bubble is coming together just as the refinement zone for the rocket itself ends, so there's a lot of airflow features that are likely getting lost in the refinement transition. One problem at a time though.
This is my 8 degree AoA model. There is still nice wake symmetry across the y-axis. Here are velocity slices through the centerline and through the fins.

View attachment 635082View attachment 635081
 
Since it's been persistent every time I've used the model split on CL with a symmetry constraint and one of the instruction videos said that they'd had trouble with the symmetry constraint, I'm thinking that's what it is. I'll try the bigger model and see what happens.

I haven't tried symmetry, since I am happy with my 2M cell model and 1-2 hour run times. One less thing to worry about.

Yeah, looks like CfdOF had some issues/changes to the 2D meshing method. Probably affects the symmetry constraint as well.
 
So I did finally get this running with a full model, ignoring the symmetry. I'm still getting a little bit of asymmetry in the wake:
1710883570971.png

It's even worse seen from the positive Y direction:
1710883664972.png

Sorry for rockets pointing different directions--that's just how the default views came up.

Before I abandon this, I would like to get some force and moment information to see how much that asymmetry affects the results. The online videos say to use the Extract Blocks tool to extract the surfaces I want, but I'm not seeing any of my rocket surfaces in the tree. Is that something I need to set in CFDOF before I run the analysis?

Thanks!
 
Not sure what to tell you on the asymmetry. This is a 4-fin rocket, yes? No cracks or leaks in the rocket surface near the fins or base? No mesh inside the rocket? All 4 fins 90 degrees apart? Is it merely perspective vs. orthographic view in Paraview?

If you set up the ReportingFunction in FreeCAd/CfdOF, there should be force and moment files in case/postProcessing/ReportingFunction. Plotting these vs. time/iteration is the best measure of convergence.

In Paraview, you need to activate the desired mesh regions in the OpenFOAMReader1 properties. I just check internalMesh and the rocket patch. Apply.

1710894934035.png

Then, extract block on the internal mesh. Extract block again on the rocket patch. Now, you can work with the fluid mesh and rocket body separately as needed.

One of the YouTube tutorials then did extract surface on the rocket patch block. Not sure why that is needed, but I do it anyway.

Don't know what CleantoGrid1 is. FreeCAD/CfdOF generates that filter when it launches Paraview. Maybe it is useful, but I ignore it.

Paraview is weird.
 
Not sure what to tell you on the asymmetry. This is a 4-fin rocket, yes? No cracks or leaks in the rocket surface near the fins or base? No mesh inside the rocket? All 4 fins 90 degrees apart? Is it merely perspective vs. orthographic view in Paraview?
It's definitely asymmetrical--I can see the differences in x, y, and z velocity gradients. It's 4 fins, and all four are at 90 degrees separation. The mesh should be OK. There are some slightly weird lines of cells, but honestly nothing that I can fix anyway. The mesh tools don't really give you options for cleaning up stuff.
If you set up the ReportingFunction in FreeCAd/CfdOF, there should be force and moment files in case/postProcessing/ReportingFunction. Plotting these vs. time/iteration is the best measure of convergence.

In Paraview, you need to activate the desired mesh regions in the OpenFOAMReader1 properties. I just check internalMesh and the rocket patch. Apply.

View attachment 636254

Then, extract block on the internal mesh. Extract block again on the rocket patch. Now, you can work with the fluid mesh and rocket body separately as needed.

One of the YouTube tutorials then did extract surface on the rocket patch block. Not sure why that is needed, but I do it anyway.

Don't know what CleantoGrid1 is. FreeCAD/CfdOF generates that filter when it launches Paraview. Maybe it is useful, but I ignore it.

Paraview is weird.
I'll try extracting the data. Thanks for the quick tutorial.
 
Back
Top