Set initial stresses from MeshNodeParameter or MeshElementParameter

dear ogs-user,

I am trying to transfer the initial stresses from a *vtu file into an ogs6 calculation. This works quite well with scalar fields. However, I couldn’t find an example where the initial stress is set via a MeshNodeParameter.

Here’s my attempt:

<parameter>
      <name>Initial_stress</name>
      <type>MeshNode</type>
      <mesh>Decovalex_D_3D</mesh>
      <field_name>sigma</field_name>
 </parameter>

This results in the error:

error: Trying to access a MeshNodeParameter but the node id is not specified.

Does anyone have an idea about this? Could it be solved as a restart, for example (I only have the stresses at the node! Not at the GP)?

Best regards,

Steffen

I think the access works via the GPs or the corresponding (x,y,z) coordinates only.
If the field is rather simple, you could try to represent it as a Function Parameter.
If this is not an option, we could think about implementing a mapping (not sure though whether it is unique in this direction). As it is only for the 0th timestep, I don’t see much efficiency issues there. @dmitri.naumov do you have an opinion on that? Alternatively, we could think of a Python preprocessing tool that does this.

Hi @steffenbeese

I am dealing with 2D problems. I have faced the same issue with Initial stress. I couldn’t use the MeshNode type for the tensors (either stress or permeability). Therefore, I created a MeshElement type distribution for the stress tensor with the components [Sxx Syy Sxy Szz] in Voight notation (2D).

As indicated by @joergbuchwald, Python preprocessing tool is one way if you know the initial stress distribution in a functional form. I have developed a Python code for doing that, I will share the code if you require it for your case.

But I think your case is different. You already have a mesh with the stresses saved at nodes. Maybe first you need to interpolate the stresses from the mesh and then you need to apply it to the MeshElements.

Thanks
Pavan

Thanks for your suggestions. For now I will use the MeshElement Parameter description. My colleague offered me a python script to generate the sigma_ip field_data in order to run the simulation as a restart.
For the future it would be really great, if all Parameter descriptions (Expression, MeshNode, MeshElement, etc.) could be used.

I was not aware that MeshElements work. But sure, there the mapping to GP is straightforward.
To do this in Python you can use VTUinterface as it is done in this example:

import vtuIO
f = vtuIO.VTUIO("Decovalex_D_3D.vtu")
pts = f.cell_center_points
# voronoi is used for n.n. interpoaltion, if it is not specified interpolation is linear
sigma = f.get_set_data("sigma", pointsetarray=pts, data_type="point", interpolation_method="voronoi") 
f.add_cell_field(sigma,"sigma","Decovalex_D_3D.vtu") 

this is similar as done here: