Jump to content

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

image.thumb.png.17b09439b412973e1e831982427f8851.png

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

}

Overlapping_elements.png

Share this post


Link to post
Share on other sites

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.

Bachelor22 likes this

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
You are posting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...