Windows fatal exception: access violation

Forum for asking and answering questions related to use of the OpenSeesPy module

Moderators: silvia, selimgunay, Moderators

Post Reply
oscom
Posts: 13
Joined: Thu Dec 29, 2022 12:55 am

Windows fatal exception: access violation

Post by oscom »

Hi everyone, I've been doing some static pushover analysis and I'm getting this error:

Windows fatal exception: access violation


Main thread:
Current thread 0x00003a08 (most recent call first):
File "D:\Oscar\Maestr\xeda Estructuras Sismorresistentes\Tesis STMF\OpenSees\Pushover\RunPushover.py", line 147 in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 465 in exec_code
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 585 in runfile
File "C:\Users\Oscar\AppData\Local\Temp\ipykernel_3388\149753308.py", line 1 in <module>


Restarting kernel...

If anyone is familiar with it please let me know. I beliebe it has something to do with Python.

Thank you.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Windows fatal exception: access violation

Post by mhscott »

Track down the line of code that causes the error
oscom
Posts: 13
Joined: Thu Dec 29, 2022 12:55 am

Re: Windows fatal exception: access violation

Post by oscom »

mhscott wrote: Thu May 18, 2023 6:38 am Track down the line of code that causes the error
The line of code that produces that error corresponds to the Analyze command, that is to say:

op.analyze(1)
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Windows fatal exception: access violation

Post by mhscott »

Can you make a minimal example that replicates the issue?
MereenBaloch
Posts: 11
Joined: Fri Jul 02, 2021 7:34 pm

Re: Windows fatal exception: access violation

Post by MereenBaloch »

mhscott wrote: Thu May 18, 2023 6:38 am Track down the line of code that causes the error
Hi mhscott is there any updates regarding this? I am also having the same error and the error line correspond to ops.analyze(10) command.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Windows fatal exception: access violation

Post by mhscott »

This error can be due to so many things. Make a minimal example that replicates the issue.
MereenBaloch
Posts: 11
Joined: Fri Jul 02, 2021 7:34 pm

Re: Windows fatal exception: access violation

Post by MereenBaloch »

mhscott wrote: Wed Nov 01, 2023 3:01 am This error can be due to so many things. Make a minimal example that replicates the issue.
import openseespy.opensees as ops
import math
import matplotlib.pyplot as plt
import numpy as np

A = 1.0
E = 2.*10**11
Fy = 3.*10**10
Nsteps = 1000
Px = 0.0
Py = 0.0
mass = 1266514796.0*4

# set modelbuilder
ops.wipe()
ops.model('basic', '-ndm', 2, '-ndf', 2)

# create nodes
ops.node(1, 0.0, 0.0)
ops.node(2, 1.0, 0.0)

# set boundary condition
ops.fix(1, 1, 1)
ops.fix(2, 0, 1)
ops.mass(2, mass, 0.0)
ops.uniaxialMaterial('FlagShape', 1, E , Fy, 0.0, 0.25)
ops.element("Truss",1,1,2,A,1)
ops.timeSeries("Linear", 1)
# create a plain load pattern
ops.pattern("Plain", 1, 1)
ops.load(2, Px, Py)

ops.system("ProfileSPD")
ops.numberer("Plain")
ops.constraints("Plain")
ops.integrator("LoadControl", 1.0/Nsteps)
ops.algorithm("Newton")
ops.test('NormUnbalance',1e-8, 10)
ops.analysis("Static")
ops.loadConst('-time', 0.0)

ops.timeSeries('Path', 2, '-dt', 0.01, '-filePath', 'Northridge Beverly.dat', '-factor', 9.81)
ops.pattern('UniformExcitation', 2, 2,'-accel', 2)

freq = ops.eigen('-fullGenLapack', 1)[0]**0.5
dampRatio = 0.05
Kcomm = (2*dampRatio)/freq
ops.rayleigh(0., 0., 0. , Kcomm)
period = (2*(math.pi))/freq

ops.wipeAnalysis()
ops.constraints('Plain')
ops.numberer('Plain')
ops.system('SparseSYM')
#ops.test('NormUnbalance',1e-8, 10)
ops.test('NormDispIncr', 1e-5, 1000)
ops.algorithm('KrylovNewton')
ops.integrator('Newmark', 0.5, 0.25)
ops.analysis('Transient')
ops.analyze(2999, 0.01)
ops.wipe()

running this example is popping up this error. When I try to fix the node two in Y direction it appears. I am not sure whether the applied earthquake load is in Y direction that's why or what. But running the same with static analysis and having load at Y direction doesn't cause this error.
mhscott
Posts: 880
Joined: Tue Jul 06, 2004 3:38 pm
Location: Corvallis, Oregon USA
Contact:

Re: Windows fatal exception: access violation

Post by mhscott »

When you fix all DOFs, there are no equations to solve. Most of the solvers will give an error. Try switching to UmfPack.

http://portwooddigital.com/2020/08/27/m ... -marplots/
Post Reply