How can I add properties in 1D .Vtu file?

Hello everyone,

I am very beginner of OGS modelling. I was trying to learn the Decay-chain problem. I went through it understood everything but the only thing I couldn’t solve is creating a .vtu file by adding properties. I prepared one but it has no properties but I downloaded one there is 3 properties. Please help me to solve the problem.

Thanks in advance.

This depends a bit on your workflow and the properties you need.
If you need property fields for MaterialIDs and boundaries, and you created your mesh with gmsh, you can use physical entities and create the vtu file via the msh2vtu python script which is part of ogstools.
If you have a bulk and boundary meshes already as VTU format you can use the identifySubdomains util in the ogs binary directory to create bulk_element_ids and bulk_node_ids property arrays that are needed for ogs to identify boundary and source term meshes. Paraview has also some filters that can be used to create/change arrays.
If you save your vtu files as ascii data you can also do it “by hand” as they are basically xml files. You can use Paraview]( or VTUinterface to change the data mode.
Other tools you could use for python are VTUinterface or meshio. Keep in mind that some OGS specific arrays like MaterialIds or bulk_elem_ids need a specific data type like UInt32 which you might need to set separately.

1 Like

Thank you so much for your help Sir. It really helped me a lot.

Hello Sir,
I hope you are doing well. I have an additional question. I created the .vtu file and created bulk_element_ids and bulk_node_id for 1D problem.
The problem is, I cannot create “materialId” in the .vtu file and also I couldn’t extract points for preparing .vtu file for boundary condition. I searched for tutorial but unfortunately I couldn’t get any.
Please help me.
Thanks in advance.