A small question about the '.prj' file


First, I wish all of you happy holidays and happy New Year.

I want to ask a question about the ‘.prj’ of the model: Link

I do not understand this syntax shown as follows:

        <medium id="0">


<medium id="1">

A similar question is found in the ‘.prj’ file of the teaching example in the video tutorial link

        <constitutive_relation id="0">
            <!-- soft sediment layer -->


        <constitutive_relation id="1">
            <!-- stiff sediment layer -->

In summary, the above two model both have id="0" and id="1".
My question is: how to define the id="0" and id="1", since I do not see any clue in the ‘.prj’ file.

Thanks for your help,

Dear Luyu @Luyu ,

id=“0” “1” etc. in the pri file correspond to the MaterialIDs in your mesh vtu. For example, medium id=“3” in prj is the material with MaterialIDs=3 in mesh vtu. And constitutive_relation id=“1” in prj file is the constitutive relation for the material with MaterialIDs=1 in mesh vtu.

And these MaterialIDs are created corresponding to the physical groups defined in your Gmsh file.

Hope this can help you!


1 Like

Hello Rui,

Thanks for your help.
As you suggested, I try to find some keywords “MaterialLDs” in mesh vtu.
However, what I have found is not as we expected, shown as follows:

In the vtu file of the above first example:

    <DataArray type="Int32" Name="**MaterialIDs**" format="appended" RangeMin="0"                    RangeMax="2"                    offset="0"                   />

It is the only one position in the vtu mentioned “MaterialIDs”.
I did not find something like “MaterialIDs=1” etc.
Do you have any clue?


Use paraview to open the vtu file. Then, you can find MaterialIDs, like this

If you have more question, free free to type here.

Hello Rui @Rui_Feng ,

Thanks for your help.
Sorry to bother you again. I posted a new question here link.
Do you have any idea?

Best regards,