tudelft3d / City4CFD

Reconstruction of 3D city models for urban flow simulations
GNU General Public License v3.0
69 stars 12 forks source link

Using city model in Ansys #8

Closed ewesterling closed 6 months ago

ewesterling commented 9 months ago

I have successfully used the code for creating a city model. However, I am having trouble with using the model for CFD using Ansys.

I can not use the output directly for the modeling, since I need the fluid volume. But extracting the fluid volume does not work. I think that is because when I load the result in Ansys the city model consist of surfaces instead of solid bodies.

I was wondering if it is possible to make from the output solid bodies, which I can use to extract the fluid volume, or if there is another solution to fix this problem.

ipadjen commented 9 months ago

Hi there! Is it Fluent that you're using?

Do you use the city model with boundaries (top, bottom, sides) as an input? You might need the boundaries to close off the volume for your fluid.

If it's the problem that individual surfaces are separate files, you can try the "output_separately"=false option. It will create one file containing all the surfaces.

I suppose starting from the 2D surfaces and creating a volume mesh around them would be a way to go.

If you really need the solid objects, probably through something like SpaceClaim you can create them from surfaces.

ewesterling commented 9 months ago

Hi, than you for your response!

Yes it is indeed fluent that I am using, I have tried it both with fluent and Ansys Meshing. In SpaceClaim I have tried to extract the volume at the model with boundaries, enclose the volume with the model without boundaries and at last I also tried to draw a box and subtract the model to get the fluid volume, but all three ways without success so far.

ipadjen commented 9 months ago

Have you tried the watertight geometry workflow?

ewesterling commented 9 months ago

Yes I did, but when trying to insert the geometry the error 'Faceted formats, like .stl .tgf and fed are not yet supported' comes up (that is the reason why I tried to convert it to a solid object )

ipadjen commented 9 months ago

My suggestion would be to try converting it to a surface format that Ansys likes, check these topics:

https://ansyskm.ansys.com/forums/topic/how-to-import-stl-in-watertight-workflow/ https://forum.ansys.com/forums/topic/how-to-work-with-stl-file/

Maybe the last post in the second topic is something you already tried though.

ewesterling commented 6 months ago

Hi, it has been a while, but I forgot to give an update: importing the .stl format did not succeed using the watertight workflow, but it did succeed with the fault tolerant workflow.

ipadjen commented 6 months ago

That sounds good, thank you for the update!