Stress Safety Factor plot - how to?

Richard Smith
Richard Smith Altair Community Member
edited April 2021 in Community Q&A

I am using HyperView to plot my LS-Dyna solution files.

I have a large model with many components made of varying materials.

I want to be able to create a safety factor contour plot based on a components Von-Mises  stress with relation to the components material yield stress. 

I have read a few threads in this forum asking similar similar questions and I've noted that the standard answer seems to be "use the expression builder" within HyperView.

I've read though the help files but I do not seem to find enough information or examples on how I might go about creating my SF contour plot.

Within HV I create VM stress plot for the whole assembly. In the results browser I can right-click on the VM stress result and select "Create- Derived Result". This brings me to the Expression Builder where VM stress is already selected as "Table Component".

From here I'm not sure how to proceed. To be able to produce such a SF plot I would need the yield stress data for each material used on each component but this data only lives in the preprocess HyperMesh file or the LS-Dyna .k file, so how can I access that information here??

There is the "ADD Resource" button that seems to require an xml file, should I use this and if so how could i produce the xml file required?

Is it possible that an example or walk through on this topic could be provided as it seems a number of users are querying the same thing. 

Is this even possible with Expression Builder, or HV in general?

The obvious goal here is to have a stress SF (or other output) contour plot within HV that can be animated or screen grabbed for report purposes.

 

SF contour plots seem to be a fairly standard output in many analysis products but I struggle to see it anywhere in HV? 

Thanks.

Richard.

 

 

Tagged:

Answers

  • Julien Comas_21483
    Julien Comas_21483
    Altair Employee
    edited November 2020

    Hi Richard,

     

    If your material allowable are available in your LS-Dyna FEM, you have to load your solver deck as the model and your results in Hyperview using the advanced Result-Math Template (example for OS model)

    image

    Then, you will by able to use the Derived Result tool :

    image

    In this tool, you can create your Reserve factor by selecting your output (Von MIses in your case) and your material allowable.

    In addition, you need to use the expression "BCElemtoPart" of the Model library to aggregate the results to the Component level (the min value of the elements of the component will be plotted for each component)

    image

    Hope this help

    Regards

    Julien

     

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited November 2020

    If you have only one Material, here's simple method:

    Choose "Equivalent stress" in Table (the name maybe different  with LS-DYNA solver)

    In Expression enter: 190 / S2

    where:

    • 190 is the Yield strength in my example
    • S2 is the code of "Equivalent stress"

    image

    When do "Apply", within Result type the new type "Safety Factor" is show

    image

    HTH,

     

     

  • Richard Smith
    Richard Smith Altair Community Member
    edited November 2020

    Hi Richard,

     

    If your material allowable are available in your LS-Dyna FEM, you have to load your solver deck as the model and your results in Hyperview using the advanced Result-Math Template (example for OS model)

    image

    Then, you will by able to use the Derived Result tool :

    image

    In this tool, you can create your Reserve factor by selecting your output (Von MIses in your case) and your material allowable.

    In addition, you need to use the expression "BCElemtoPart" of the Model library to aggregate the results to the Component level (the min value of the elements of the component will be plotted for each component)

    image

    Hope this help

    Regards

    Julien

     

    Hi Julien, thanks for the quick reply.

    Unfortunately I still don't follow how to do this.

    In HV I've loaded in my LS-Dyna results file(s), .i.e D3PLOT.

    I've loaded in my model file, i.e. in this case Crush_Tube.k 

    image

    After plotting a VM stress plot I've then selected "derived results" from the results browser.

    I select "model" as the library and I can select "BCElemtoPart".

    image

    Now I'm not sure what to do?

    Under "Table" if I see the following options:

    image

    If I select "Materials" I see no sub options, i.e. I do not know how I can get to the yield values or the "material allowables".

    image

     

    Could you give a little more detail please or an exact example?

    Thanks again for your help.

    Richard.

     

     

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited November 2020

    Hi Julien, thanks for the quick reply.

    Unfortunately I still don't follow how to do this.

    In HV I've loaded in my LS-Dyna results file(s), .i.e D3PLOT.

    I've loaded in my model file, i.e. in this case Crush_Tube.k 

    image

    After plotting a VM stress plot I've then selected "derived results" from the results browser.

    I select "model" as the library and I can select "BCElemtoPart".

    image

    Now I'm not sure what to do?

    Under "Table" if I see the following options:

    image

    If I select "Materials" I see no sub options, i.e. I do not know how I can get to the yield values or the "material allowables".

    image

     

    Could you give a little more detail please or an exact example?

    Thanks again for your help.

    Richard.

     

     

    You can also use the 'Add Resource' to add an external XML file with your allowables 'by id'.

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    After this is loaded into your Expression builder, use:

    BCMatToElem to map your Allowables from your Material (coming from the XML file) to your elements.

    Then you could use this value for some other operation such as described by Julien.

  • Julien Comas_21483
    Julien Comas_21483
    Altair Employee
    edited November 2020

    You can also use the 'Add Resource' to add an external XML file with your allowables 'by id'.

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    After this is loaded into your Expression builder, use:

    BCMatToElem to map your Allowables from your Material (coming from the XML file) to your elements.

    Then you could use this value for some other operation such as described by Julien.

    Hi Richard,

     

    I reply to quickly, and it appears that HV is not able to read material allowables from Dyna models, that's why you are not able to find it in the expression builder.

    Sorry, I was not aware of that.

    BTW, I think Adriano solution is a good one, you just need to build your own xml file based on your material allowables.

    Regards

    Julien

  • Richard Smith
    Richard Smith Altair Community Member
    edited November 2020

    You can also use the 'Add Resource' to add an external XML file with your allowables 'by id'.

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    After this is loaded into your Expression builder, use:

    BCMatToElem to map your Allowables from your Material (coming from the XML file) to your elements.

    Then you could use this value for some other operation such as described by Julien.

    Hi Adriano. 

    I'm not sure I follow entirely.

    So I've made an XML file as follows that has just 2 materials in it with their respective yield values (in GPa):

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
    <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
    <Attrib>
    <Val id="1" value="0.7" />
    <Val id="2" value="0.35" />
    </Attrib>
    </Values>
    </Tables>

    I've added that file to the expression builder via "add resource".

    Now I see an entry in the "Table" field of "yield" as such:

    image

    But what now?

    I've inserted "BCMatToElem" into expression builder but I'm not sure of the syntax now?

    How do i map the 2 materials yields to the actual model parts/elements?

    Thanks.

     

     

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited November 2020

    Hi Adriano. 

    I'm not sure I follow entirely.

    So I've made an XML file as follows that has just 2 materials in it with their respective yield values (in GPa):

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
    <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
    <Attrib>
    <Val id="1" value="0.7" />
    <Val id="2" value="0.35" />
    </Attrib>
    </Values>
    </Tables>

    I've added that file to the expression builder via "add resource".

    Now I see an entry in the "Table" field of "yield" as such:

    image

    But what now?

    I've inserted "BCMatToElem" into expression builder but I'm not sure of the syntax now?

    How do i map the 2 materials yields to the actual model parts/elements?

    Thanks.

     

     

    Actually, i forgot a really important step.

    When you load your model, using 'advanced' math template, be sure of loading your solver deck as a model file (.fem for OptiStruct, for example), and the results can be your regular results.

    Doing this, HV will retrieve your model organization, including material data associated to elements.

    image

    For the expression itself, and exemple below, after loading your XML as resource.

    I've used BCMatToElem for mapping the 'yield' (LCF1.S6 in this example) to its respective elements.

    Then I've included the vonMises stress in the beginning to be the numerator.

    Give the expression a good name, and hit Ok.

    Then going to your contour, you will find it there.

    image

    image

  • Richard Smith
    Richard Smith Altair Community Member
    edited November 2020

    Actually, i forgot a really important step.

    When you load your model, using 'advanced' math template, be sure of loading your solver deck as a model file (.fem for OptiStruct, for example), and the results can be your regular results.

    Doing this, HV will retrieve your model organization, including material data associated to elements.

    image

    For the expression itself, and exemple below, after loading your XML as resource.

    I've used BCMatToElem for mapping the 'yield' (LCF1.S6 in this example) to its respective elements.

    Then I've included the vonMises stress in the beginning to be the numerator.

    Give the expression a good name, and hit Ok.

    Then going to your contour, you will find it there.

    image

    image

    Hi again Adriano.

    Ok, understand all that.

    The part I'm struggling with is how do the yield values get mapped to the correct parts?

    In the xml code section:

    <Val id="1" value="0.7" />
    <Val id="2" value="0.35" />

    What is id="1"?

    Is this the material id in this case?

    So in my xml file I need an entry for each material and I must match that "id" to the MID (material id in LS-Dyna) within my model file?

    So after loading in the model file (using advanced math template) does HV then know what MID belongs to which parts/elements in the results file?

    Is this correct?

    Thanks.

     

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited November 2020

    Hi again Adriano.

    Ok, understand all that.

    The part I'm struggling with is how do the yield values get mapped to the correct parts?

    In the xml code section:

    <Val id="1" value="0.7" />
    <Val id="2" value="0.35" />

    What is id="1"?

    Is this the material id in this case?

    So in my xml file I need an entry for each material and I must match that "id" to the MID (material id in LS-Dyna) within my model file?

    So after loading in the model file (using advanced math template) does HV then know what MID belongs to which parts/elements in the results file?

    Is this correct?

    Thanks.

     

    correct.

    You need 1 line for each material in your model and use the IDs accordingly with your model.

    then advanced math will map this according to your fem model.

  • Richard Smith
    Richard Smith Altair Community Member
    edited November 2020

    correct.

    You need 1 line for each material in your model and use the IDs accordingly with your model.

    then advanced math will map this according to your fem model.

    Ok Adriano, thanks so much for this i will test it out, now I understand.

    One more thing then if I may.

    In the example we used here we were introducing the material yield values to the expression builder.

    In general then I want to introduce another material parameter in the same manner how do i know what the xml code difference are?

    For instance, if i want plot a normalized plastic strain plot where the parts plastic strain values are divided by the materials max elongation limit to failure (max %el). Which part the following xml code do i modify. i.e. in the below code for yield which parameter signifies it is yield to be mapped? Is it label ="yield" or is this just a name to give to the table list, or is it slice="slice 0"

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

    How would i set this code to "max %el" for example? In general, is there a list of parameters that can be mapped, or am I missing something here?

    Thanks gain for your help.

  • Jouher_20819
    Jouher_20819 Altair Community Member
    edited April 2021

    @Julien Comas @Q.Nguyen-Dai 

    Hi All,

    I have tried the above methods and it worked well. But, I am looking forward to plot Factor of safety by using only the result file (say .odb file without the model file). Is there a way for this? Kind of providing component ID or Material Id for each component and its corresponding yield value, then plot the FOS.

    Any help is appreciated. Thanks

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited April 2021

    @Julien Comas @Q.Nguyen-Dai 

    Hi All,

    I have tried the above methods and it worked well. But, I am looking forward to plot Factor of safety by using only the result file (say .odb file without the model file). Is there a way for this? Kind of providing component ID or Material Id for each component and its corresponding yield value, then plot the FOS.

    Any help is appreciated. Thanks

    You can''t run away of extra files:

     

    Load your model, and results, using 'advanced' math template.

    Use the 'Add Resource' to add an external XML file with your allowables 'by id'.

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    After this is loaded into your Expression builder, use:

    BCMatToElem to map your Allowables from your Material (coming from the XML file) to your elements.

    Then you could use this value for some other operation such as described by Julien.

     

  • Jouher_20819
    Jouher_20819 Altair Community Member
    edited April 2021

    @Adriano Koga Thanks for your help. As per the above replies I am using the formula 

    ("S-Stress components:Mises"/BCMatToElem("LC0F1.Yield")) which gives the new contour (Xml, model and result file are used as explained in above comments )
     
    But, my genuine doubt is as per my learnings --> FOS = Yield stress/ Working stress
    But our input formula in HV looks inverse. Could you please clarify me on this?
  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited April 2021

    @Adriano Koga Thanks for your help. As per the above replies I am using the formula 

    ("S-Stress components:Mises"/BCMatToElem("LC0F1.Yield")) which gives the new contour (Xml, model and result file are used as explained in above comments )
     
    But, my genuine doubt is as per my learnings --> FOS = Yield stress/ Working stress
    But our input formula in HV looks inverse. Could you please clarify me on this?

    Just invert the formula as you wish and you'll be fine :)

    HV accepts any formula that you want to use.

     

  • Jouher_20819
    Jouher_20819 Altair Community Member
    edited April 2021

    @Adriano Koga I have inversed the formula to meet the FOS formula, but I getting results in power 12 digits

  • Jouher_20819
    Jouher_20819 Altair Community Member
    edited April 2021

    @Adriano Koga I have inversed the formula to meet the FOS formula, but I getting results in power 12 digits

    I would like to know the right formula in HV to be used to calculate factor of safety. Please guide me

  • Adriano Koga_20259
    Adriano Koga_20259 New Altair Community Member
    edited April 2021

    I would like to know the right formula in HV to be used to calculate factor of safety. Please guide me

    if you have some part with 0 stress value, then your FOS will go to infinity.

     

    If you want to check, create your derived results by part.

    First, create a plot only with the simple Yield Stress ..BCMatTo.....and then plot to see if all is working fine.

    Then create your FoS using the whhole formula.

     

    There's another option with is Margin of safety: (1.0 - Stress/Yield)

    negative margins means your stress have reached your yield. No infinite values.

  • Varsha Goel_20610
    Varsha Goel_20610 Altair Community Member
    edited April 2021

    You can''t run away of extra files:

     

    Load your model, and results, using 'advanced' math template.

    Use the 'Add Resource' to add an external XML file with your allowables 'by id'.

    <?xml version="1.0" encoding="utf-8"?>

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    After this is loaded into your Expression builder, use:

    BCMatToElem to map your Allowables from your Material (coming from the XML file) to your elements.

    Then you could use this value for some other operation such as described by Julien.

     

    Hello @Adriano Koga 

    Following table is used to bind material ids to the specified yield values.

    <Tables>
        <Values bind="MATL" format="SCALAR" domain="REAL" precision="FLOAT" label ="yield" slice="slice 0" pool="Materials" step="0" subcase="0">
            <Attrib>
                <Val id="1" value="6200.0" />
                <Val id="2" value="4830.0" />
                <Val id="3" value="9200.0" />
            </Attrib>
        </Values>
    </Tables>

     

    Is there a way to bind Set ids as well? Please let me know the code for the same .