Setting geometric parameters for the simulation(domain size, resolution)

Good day! I have a question regarding setting simulation parameters. I currently am working with externalFlowAroundObject as my basis for an analyzing airflow in and around a Philippine jeepney. For a resolution of 80, I’ve used scaleSTL to bring my largest length down to 0.58 with the simulation having a domain size of (2, 1.2, 0.8).

I intend to bring the geometry to a physical size of 580, or 5800 to get better visualization of the flow, but increasing the physical domain size proportionally (by 10^x, I’ve assumed SI for physical units) causes the simulation to stop.

From what I understand, the lattice size (nx, ny, nz) is really just dictated by the PC’s processing capacity. As for the others, dt is dictated by the flow’s physical parameters, while dx depends on resolution, which again circles back to a possible choice with regard to processing capacity. resolution really is just defined as the no. of lattice nodes, which seems to be something I can pick.

What would be a wise way to choose a value for this (changing domain only or resolution only)? And what else would I have to check with regard to making the scale adjustments? I apologize if I misunderstood the variable setting. I’ve checked the units file, too.

If it helps, the errors I run into are floating point exception (integer-divide-by-zero), bad_alloc after the voxelizing the domain message, or an error related to the Guo-Off Lattice Model.

Thank you for taking the time to read this!

Hello mishvs,

The dimensions of your object only matter relative to the viscosity and the flow velocity, that together will allow reproducing the correct Reynolds number. You can rescale the results at the output operation. If your initial setting does work, I would try increasing only the resolution to have nicer results. I say “nicer” because obtaining realistic results for you case is probably out of reach, as it would lead to an enormous mesh.

Hope it helps!



Hello Philippe, thank you for answering!

I understand that the Re would be able to replicate the flow, and the properties of viscosity and flow velocity would factor into dx and dt, thus altering how my object could be seen in lattice units. But if I recall correctly, Re depends on my characteristic length too, and I’m quite lost how it would then factor in, given the input taken by the xml file, which simply are the (scaled down, currently) geometry, (scaled down) domain and the center of the object.

My real object size should have about 5.8 meters for its characteristic length, but if it takes the STL, it may assume my characteristic length to be 0.58 which isn’t quite accurate.

Or if ever, I do set a 10 m x 10 m x 10 m physical domain, and for a scaled down geometry, write 1.0 x 1.0 x 1.0 for domain size, would the Re then still hold valid with just the viscosity and flow velocity?

In terms of rescaling the output, I worked with the output in PPM as per the original code and came up with a pretty pixelated view, so I thought it was all I could obtain, so I’ll try and explore more :sweat_smile:

You should have a constant Reynolds number, so if you divide the domain dimension by 10, you could for example compensate by dividing the viscosity by 10. Anyway, the Reynolds number you are targetting is so high that the numerical model will no be able to hold, and will probably crash.

If you need accurate results, you should move to the more complex example with gridrefinement3D (that will be tough, though, and probably not sufficient). If not, you could just work at a reduced size.



Thank you for the quick reply! I’m sorry for deleting I remembered something I wanted to add and was new to posting in the forum :sweat_smile:

So, in terms of keeping a constant Re, I just remembered this bit from the book by Kruger et. al:

Would that mean then, that one way I could also factor in if I wanted to keep the Re, aside from the viscosity is through the uLB?

uLB is more like a numerical parameter (roughly, it represent the fraction of a cell size that the flow will cross during one time step).

Oh, I see. Thank you for clarifying that!