Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Conformal mesh at interfaces of composite solid

More
3 years 10 months ago - 3 years 10 months ago #2785 by Luma
Hi everybody,

i got some questions concerning thermal simulation of a composite solid consisting of different materials. As a MWE, i designed a model of three adjacent blocks in Freecad and exported it as a .step file (see attachment).

My first question is, how to get a conformal mesh at the interface between the regions. When looking at a section of the interface, one can see that the mesh is nonconformal at the moment.

Although the heat conduction over the interface works, i guess the nodal values are interpolated and contain an interpolation error.
I'm quite new to cad design and it may be that the problem lies within my step file.

In addition, i have two smaller issues:
I managed to set different conductivities and sourceterms for the subdomains, but failed visualizing them.
I tried with Draw(sources,mesh,'piecewise'), but the result is just some random colorization on the surfaces of the body.
I also cant get the mesh.SetMaterial() routine on the different domains of the ngsolve.comp.Mesh to work. They are named [domain_0,domain_1,domain_2] by default and i would like to change that.

Thanks for your support, have a great weekend!

Lukas
Last edit: 3 years 10 months ago by Luma. Reason: Missing attachments
More
3 years 10 months ago #2786 by joachim
Hi Lukas,

you have to glue your objects to get a conforming mesh at the interface. You have to do it in Freecad - or
you update to the coming nightly Netgen/NGSolve version, in which a
Code:
geo.Glue()

is available.

To visualize the conductivities, you have to visualize them in the clipping-plane. Otherwise, the coefficients are associated with the surface numbers.
Code:
Draw(sources,mesh,'piecewise', draw_surf=False)

You can set material names in the Netgen-mesh, a member of the NGSolve-mesh. Be aware that numbering is 1-based, here:
Code:
mesh.ngmesh.SetMaterial(1, "mymat")


Joachim
The following user(s) said Thank You: Luma
More
3 years 10 months ago #2803 by Luma
Hello Joachim,

thank you for the quick response! The two minor issues are all clear now.

Unfortunately i could not find out yet, how to export the composite solid with the correct Interface from FreeCAD (When meshed in FreeCAD, the Interface seems to be all good).
Could you specify the geo.Glue() option? I updated to the newest NetGen version (via conda) and the OCCGeometry object yet has no attribute 'Glue'. Which version do I need exactly and how would the workflow look like?

Best
Lukas
More
3 years 10 months ago #2807 by matthiash
You can try the ngsolve-nightly conda package. I just updated it to the current master.

Best,
Matthias
Time to create page: 0.124 seconds