A small question about the '.prj' file

Hello,

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:

    <media>
        <medium id="0">
            <phases>
                <phase>
                    <type>AqueousLiquid</type>

and

<medium id="1">
    <phases>
        <phase>
            <type>AqueousLiquid</type>

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 -->
            <type>LinearElasticIsotropic</type>

and

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

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,
Luyu

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!

Best,
Rui

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:

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

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?

Thanks,
Luyu

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,
Luyu