🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Catching An Error

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

Hey guys,

 

I want to catch a mistake concerning the mesh. when this mistake is occuring, the user should be able to fix the mesh.

During a while loop i have sometimes an error in the command *plotnodelist, because it needs the inputs 'results of a analysis' and 'nodes id'.

Sometimes the analysis fails and *plotnodelist leads to a break down of Hyperworks because of the missing results. 

Here is the relevant part of my code:

 

while {} {......

 

if { [catch {*plotnodelist 1}] } {
   puts 'analysis failed '
    break 

        
} else {

*plotnodelist 1

}

 

....}

 

Kind regards

Simon

Find more posts tagged with

Sort by:
1 - 8 of 81
    User: "Jeffersondhv"
    Altair Community Member
    Updated by Jeffersondhv

    So what is the action you need the user to take when the analysis fail?

    User: "llyle_20499"
    New Altair Community Member
    Updated by llyle_20499

    break down of Hyperworks

    does this mean segmentation error? 

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    The failure information is on the lower left corner.
    If this failure occurs, HyperMesh shows no reaction and has to be closed and opened every time.

    I want to catch this failure and stop the loop if the failure occurs.
    After this i want to correct the mesh in HyperMesh and start another iteration.

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.17b09439b412973e1e831982427f8851.png

    User: "Jeffersondhv"
    Altair Community Member
    Updated by Jeffersondhv

    I see two things you can do:

    1. Identify the error reading the result's file and act accordingly;

    2. Identify the root cause from the meshing process and act from there.

     

    Do you know which mesh issue is causing this problem?

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Thanks for your efforts! 

     

    1. I'm executing a solver at first and load the results afterwards. 
    But sometimes the solver failed because the meshed is too bad, so no result file is
    written. The command *plotnodelist needs the results file and fails if it's not existing.
    --> HyperWorks closes

     

    2.  meshing problem is non-correctable, because two 2d mesh edges are running into each other 
    during thermal expansion and the mesh overlaps. The solver fails in the next step in a static analysis (--> 1)
    The overlapping is shown in the picture.

     

    The skript is running for many iteration without problems, but after some iteration the described problem occurs and HyperWorks crashes.
    I want so improve the mesh after it fails and start the programm again.

     

    There must be a mistake in the code of catching the problem.
     

     

     

    For the sake of completeness the part before the command '*plotnodelist

     

    # executing the solver

     

    exec $batch -analysis '$path/${name}.fem'
    hm_answernext yes
    *analysisfileset '$path/${name}.res'

     

    #make a contour plot


    *setgeomrefinelevel 1
    *drawlistresetstyle 
    *setcuttingplanesbase 0 29.3749355 7.5
    *clipboundaryelements 1
    *inputsimulation 'SUB1 - Statische Analyse      ' 'Von Mises Stress'
    *contourplot '' 0 0 0 0 1 0 0 0 'magnitude' 1 0 0

     

    #select the component nodes and plot the results


    *createmark nodes 1 'by comp name' Randschicht 
    *createlist nodes 1 {*}[hm_getmark nodes 1] 
    set NodeList [hm_getlist nodes 1] 

     

    if { [catch {*plotnodelist 1}] } {
       puts 'analysis failed '
        break 

            
    } else {

    *plotnodelist 1

    }

    <?xml version="1.0" encoding="UTF-8"?>Overlapping_elements.png

    User: "vipin_22401"
    Altair Community Member
    Updated by vipin_22401

    Hi,

    You don't need to write *plotnodelist again inside the else condition. Else will be executed when the initial code is successful.

    User: "Jeffersondhv"
    Altair Community Member
    Updated by Jeffersondhv

    If no result file is written, then all the marks and node lists you create after the analysis is complete are blank.

    So you could try to identify if the result file exists, or simply check if these marks are blank.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    Thanks for your help guys, this helped us a lot!