KratosMultiphysics / Kratos

Kratos Multiphysics (A.K.A Kratos) is a framework for building parallel multi-disciplinary simulation software. Modularity, extensibility and HPC are the main objectives. Kratos has BSD license and is written in C++ with extensive Python interface.
https://kratosmultiphysics.github.io/Kratos/
Other
1.02k stars 245 forks source link

[Mapping] Map elemental/condition values #12389

Open ddiezrod opened 4 months ago

ddiezrod commented 4 months ago

As I explained in my latest issue https://github.com/KratosMultiphysics/Kratos/issues/12386 Im trying to use the mapping app to initialize values from one mesh reading them from another one.

For the case of Stresses, they are stored in the elemental database in the origin model part. I was wondering if it is possible somehow to use the elements instead of the nodes for the mapping. From what I see in the code I think it is not.

I'd like to know if anyone has encountered this problem before and if they managed to solve it. Of course, one solution would be to send the data to the nodes doing some kind of volume based averaging, but I don't know if that might be too diffusive.

The other possibility would be to try to implement a new mapping myself. My first idea would be to use the nearest element using the element center location as reference.

Any suggestions or ideas are very welcome! @KratosMultiphysics/altair @philbucher @KratosMultiphysics/technical-committee @KratosMultiphysics/implementation-committee

philbucher commented 4 months ago

As explained in the readme, mapping on elements/conditions is not supported. In the past we could not agree on the interface (elemental vs GP values etc). In the end, there was not enough interest to really push for it

Long story short, only nodes can be used for mapping, i.e. you need to interpolate/extrapolate from/to elements or wherever your data lives

How badly do you need it? Ofc there is always a way but depend how much effort you want to put 🤔