Page 1 of 1

FATAL:second_order_eqn: Complex roots.

Posted: Thu Jul 11, 2024 1:48 pm
by Lei Lei
Dear STKO team,

When I run my model, it always shows the error:FATAL:second_order_eqn: Complex roots.

For my model, I use PDMY to simulate soil and definite the first two stages to conduct the initial analysis. When the first two stages use Penalty Constraints to analyze, the above error never disappears. However, it will succeed sometimes when I change them to Transformation Constraints, and change the constraint factors of the third stage. Also, when I reduce the analysis steps for the first two stages, it can make it.

So, I want to know the probable reason for this error.

Best Wishes!

Re: FATAL:second_order_eqn: Complex roots.

Posted: Mon Jul 15, 2024 6:30 am
by kesavapraba
This can occur when the stiffness matrix becomes ill-conditioned or singular, leading to numerical instability in the analysis. Penalty Constraints can lead to ill-conditioning of the stiffness matrix, especially when the penalty factors are not chosen carefully! So, choose the factors based on the avergae value of stiffness of your model. You can use
puts [EleStiffnessOOM]
Tcl custom command in the analysis section (before the analysis settings), this will provide the min/max/average stiffness values of the model. You can use 3-4 order higher than the average value for penalty factors.

Re: FATAL:second_order_eqn: Complex roots.

Posted: Mon Jul 15, 2024 8:15 am
by Lei Lei
Thanks!
kesavapraba wrote: ↑
Mon Jul 15, 2024 6:30 am
You can use 3-4 order higher than the average value for penalty factors.
I did use this to choose the factor of the penalty, but it didn't always solve the problem.

Maybe there are some other mistakes existing in the model.

Thanks for your reply!

Re: FATAL:second_order_eqn: Complex roots.

Posted: Tue Jul 16, 2024 2:47 pm
by LeoCoh
Dear user,
This is the response from the AI chatbot:
The error "FATAL:second_order_eqn: Complex roots" typically indicates numerical instability in your model, often related to the stiffness matrix becoming ill-conditioned or singular. Here are some potential reasons and solutions for this issue:
Potential Reasons

Penalty Constraints:
Penalty constraints can lead to ill-conditioning of the stiffness matrix, especially if the penalty factors are not chosen carefully. This can cause numerical instability and result in complex roots.

Stiffness Matrix Issues:
The stiffness matrix might become ill-conditioned or singular due to improper material properties, boundary conditions, or element formulations.

Analysis Steps:
Reducing the number of analysis steps can sometimes help, but it might not be a permanent solution. It indicates that the model might be too stiff or too flexible in certain regions.

Solutions

Adjust Penalty Factors:
Choose penalty factors that are 3-4 orders of magnitude higher than the average stiffness of the elements involved. This can help in stabilizing the solution.

Use Transformation Constraints:
As you mentioned, using transformation constraints instead of penalty constraints can sometimes resolve the issue. Transformation constraints are generally more stable.

Check Material Properties:
Ensure that the material properties, especially for the PDMY soil model, are defined correctly. Incorrect properties can lead to numerical issues.

Refine Mesh:
A finer mesh can sometimes help in resolving numerical issues. Ensure that the mesh is adequately refined in regions with high gradients.

Incremental Loading:
Apply loads incrementally to avoid sudden changes in the stiffness matrix. This can help in achieving a more stable solution.

Check Boundary Conditions:
Ensure that the boundary conditions are applied correctly and do not over-constrain the model.

Example Adjustments

Here’s an example of how you might adjust the penalty factors and use transformation constraints in your OpenSees TCL script:

# Define penalty factors
set penaltyFactor 1.0e10

# Apply penalty constraints
constraints Penalty $penaltyFactor $penaltyFactor

# Alternatively, use transformation constraints
# constraints Transformation

# Define analysis steps
set numSteps 100
set dt 0.01

# Run the analysis
analyze $numSteps $dt