How do I create the .sur file for nearest-projection?

Hello,

I’m new to preCICE and CalculiX, so maybe this is a daft question:

I’m trying to set up a flexible tube like simulation starting from the 3d Tube tutorial. I have the simulation running with “nearest-neighbor” mapping, but obviously that is not ideal. I tried rbf, but that seems to be quite slow.

I’d like to use the nearest-projection mapping but am stuck at the problem of the surface file.

How do I create the .sur file? I understand the concept and that the .sur file contains volume elements (linear or quadratic tets) sorted by which of the elements 4 surfaces is lying in the surface.

But how do I create this surface? I use Salome for meshing, and CGX to create the msh and nam files. But “send interface abq sur” creates an empty file. I have tried a mesh with additional 2D surface elements, but CalculiX doesn’t like those (so I have to delete them in the all.msh) and also tried to create a group of volume elements that lie in the surface (>= 3 nodes in Ninterface), but that doesn’t seem to work, either.

I guess I’m missing something fairly basic here.

Hi,

what elements are you trying to create? I don´t use CGX so I am not sure what elements it supports. Does it fail for linear and quadratic elements?

Regarding RBF mapping, what RBF settings did you use? Thin-plate-splines (global) or Gaussian (local)? Global RBF`s are expensive even for small meshes.

A few ideas:

Maybe it already helps if you clarify the name of your set, is it Ninterface or interface you need as argument in the ‘send’ command? But I’m not sure about this…

If you call ‘prnt se’ in CGX, you can see whether the respective set contains faces. If not, maybe try to complete the (node-)set in CGX by calling ‘comp’ (with the respective arguments, see CGX-Manual) and then try to create the .sur-file again.

What do you mean, when you say CGX creates an Empty File? Is there a Header that says something like
** Surfaces based on interface
*SURFACE, NAME=Sinterface
or is the file completely empty?
If its completely empty, I don’t know what to do…

Hi All,

Thanks for the help. I may have solved the issue. It was a problem with the UNV to CCX converter.

When creating the mesh with Salome, Salome will create 2d elements for all surfaces. For Calculix you need to create node groups bases on the geometry (e.g. inlet, outlet, wall, interface, etc) - these can then later be exported in CGX using the “send name abq nam” command to create .nam files to import. In addition you create a surface element group based on the interface geometry (this will, in Salome, contain 2d elements, not the volume elements that CCX and preCICE need in the .sur file).

I used unv2ccx as a converter (https://github.com/calculix/salome2ccx) which creates 3d element sets, node sets (from node groups), and 2d element sets (from 2d element groups), but no surfaces. Which caused the problem, since CCX doesn’t like the 2d elements in a 3d case.

When using unical3 as a unv to calculix converter, that will discard all 2d elements and translate the 2d surface group into a 3d element set describing the surface (interface). This can then be exported from CGX using “send interface abq sur” (creating the 3D element set for the surface definition) in addition to “send interface abq nam” (creating the node set for boundary conditions).

Hope this helps.

T

P.S. RBF I am using local TPS with a radius of around 2-3 node distances (the mesh is quite uniform for this case). This seems to work nicely so far, need to test Gaussian. Global TPS was a lot slower. The only problem is the memory footprint ccx_preCICE eats 7.5GB for my test case (200,000 fluid cells - around 14,000 interface surfaces, 30,000 quadratic solid elements - around 2000 interface surfaces).

P.P.S. When I said “empty file” I meant “only headers”, so GCX did work as expected, it was just that the converter did not create the surface 3d element set needed.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Related: How can I create a CalculiX mesh and configuration?