-
Dear all, I am struggling a bit with the creation of multiple volumes by the VGEN command. Maybe you can tell me why I can't generate the volumes. Thank you very much! :) General setup:import matplotlib.pyplot as plt
import numpy as np
import math as m
import itertools
import pandas
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()
mapdl.prep7()
mapdl.units("SI")
mapdl.ignore_errors = True
mapdl.et(1, "SOLID185")
mapdl.mp("EX", 1, 210e9)
mapdl.mp("DENS", 1, 7800)
mapdl.mp("NUXY", 1, 0.3)
mapdl.keyopt(1, 2, 3)
mapdl.nlgeom("ON")
#Slicing
anzahl_scheiben = 5
anzahl_scheiben_board = 20`
[...]
**Definition of Rollers:**
`#ROLLEN
#Outboard
#Keypoints
mapdl.k(60, 0, 15.11e-03+of, 8.74e-03)
mapdl.k(61, 0, 21.61e-03+of, 10.21e-03)
#mapdl.k(62, 0, 21.81e-03+of, 10.25e-03)
#mapdl.k(63, 0, 15.04e-03+of, 37.07e-03)
mapdl.k(64, 0, 14.9e-03+of, 37.04e-03)
mapdl.k(65, 0, 9.02e-03+of, 35.71e-03)
#Linien
r_ob_l60 = mapdl.l(60, 61)
r_ob_l61 = mapdl.l(61, 64) #Laufbahn Rolle - Außenring Outboard
r_ob_l62 = mapdl.l(64, 65)
r_ob_l63 = mapdl.l(65, 60)
#Fläche Rolle Outboard
a_r_ob = mapdl.a(60, 61, 64, 65)
#Erzeugung Scheiben Rollen Outboard
mapdl.lesize(nl1=r_ob_l61, ndiv=anzahl_scheiben-1) #Outboard
#Inboard
#Keypoints
mapdl.k(70, 0, 9.02e-03+of, 79.29e-03)
mapdl.k(71, 0, 14.9e-03+of, 77.96e-03)
#mapdl.k(72, 0, 15.04e-03+of, 77.93e-03)
#mapdl.k(73, 0, 21.8e-03+of, 104.75e-03)
mapdl.k(74, 0, 21.61e-03+of, 104.79e-03)
mapdl.k(75, 0, 15.11e-03+of, 106.26e-03)
#Linien
r_ib_l70 = mapdl.l(70, 71)
r_ib_l71 = mapdl.l(71, 74) #Laufbahn Rolle - Außenring Inboard
r_ib_l72 = mapdl.l(74, 75)
r_ib_l73 = mapdl.l(75, 70)
#Fläche Rolle Inboard
a_r_ib = mapdl.a(70, 71, 74, 75)
print("Flächen vorhanden für Outboard?", mapdl.geometry.areas)
print("Flächen vorhanden für Inboard?", mapdl.geometry.areas)
print("a_r_ob:", a_r_ob)
print("a_r_ib:", a_r_ib)
#Erzeugung Scheiben Rollen Inboard
mapdl.lesize(nl1=r_ib_l71, ndiv=anzahl_scheiben-1) #Inboard
#EXTRUDIEREN - Rollen
#Outboard
mapdl.vsel("NONE")
mapdl.vrotat(a_r_ob, pax1=60, pax2=65, arc=360, nseg=2) #Outboard
print("Outboard:",mapdl.geometry.volumes)
mapdl.csys(1)
mapdl.vgen(itime=anzahl_rollen, nv1="ALL", dy=360/anzahl_rollen, imove=0)
mapdl.vsel("ALL")
#Inboard
mapdl.vsel("NONE")
mapdl.vrotat(a_r_ib, pax1=70, pax2=75, arc=360, nseg=2) #Inboard
print("Inboard:",mapdl.geometry.volumes)
mapdl.csys(1)
mapdl.vgen(itime=anzahl_rollen, nv1="ALL", dy=360/anzahl_rollen, imove=0)
mapdl.vsel("ALL")
mapdl.vplot()
mapdl.exit()` Output from Console:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @herttim I am missing some parameters like But setting those to ![]() However, I believe your problem is related to plotting (many Code used to get VPLOT
import matplotlib.pyplot as plt
import numpy as np
import math as m
import itertools
import pandas
from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl()
mapdl.clear()
mapdl.prep7()
mapdl.units("SI")
mapdl.ignore_errors = True
mapdl.et(1, "SOLID185")
mapdl.mp("EX", 1, 210e9)
mapdl.mp("DENS", 1, 7800)
mapdl.mp("NUXY", 1, 0.3)
mapdl.keyopt(1, 2, 3)
mapdl.nlgeom("ON")
#Slicing
anzahl_scheiben = 5
anzahl_scheiben_board = 20
# [...]
# **Definition of Rollers:**
#ROLLEN
#Outboard
#Keypoints
of = 0
mapdl.k(60, 0, 15.11e-03+of, 8.74e-03)
mapdl.k(61, 0, 21.61e-03+of, 10.21e-03)
#mapdl.k(62, 0, 21.81e-03+of, 10.25e-03)
#mapdl.k(63, 0, 15.04e-03+of, 37.07e-03)
mapdl.k(64, 0, 14.9e-03+of, 37.04e-03)
mapdl.k(65, 0, 9.02e-03+of, 35.71e-03)
#Linien
r_ob_l60 = mapdl.l(60, 61)
r_ob_l61 = mapdl.l(61, 64) #Laufbahn Rolle - Außenring Outboard
r_ob_l62 = mapdl.l(64, 65)
r_ob_l63 = mapdl.l(65, 60)
#Fläche Rolle Outboard
a_r_ob = mapdl.a(60, 61, 64, 65)
#Erzeugung Scheiben Rollen Outboard
mapdl.lesize(nl1=r_ob_l61, ndiv=anzahl_scheiben-1) #Outboard
#Inboard
#Keypoints
mapdl.k(70, 0, 9.02e-03+of, 79.29e-03)
mapdl.k(71, 0, 14.9e-03+of, 77.96e-03)
#mapdl.k(72, 0, 15.04e-03+of, 77.93e-03)
#mapdl.k(73, 0, 21.8e-03+of, 104.75e-03)
mapdl.k(74, 0, 21.61e-03+of, 104.79e-03)
mapdl.k(75, 0, 15.11e-03+of, 106.26e-03)
#Linien
r_ib_l70 = mapdl.l(70, 71)
r_ib_l71 = mapdl.l(71, 74) #Laufbahn Rolle - Außenring Inboard
r_ib_l72 = mapdl.l(74, 75)
r_ib_l73 = mapdl.l(75, 70)
#Fläche Rolle Inboard
a_r_ib = mapdl.a(70, 71, 74, 75)
print("Flächen vorhanden für Outboard?", mapdl.geometry.areas)
print("Flächen vorhanden für Inboard?", mapdl.geometry.areas)
print("a_r_ob:", a_r_ob)
print("a_r_ib:", a_r_ib)
#Erzeugung Scheiben Rollen Inboard
mapdl.lesize(nl1=r_ib_l71, ndiv=anzahl_scheiben-1) #Inboard
#EXTRUDIEREN - Rollen
#Outboard
mapdl.vsel("NONE")
mapdl.vrotat(a_r_ob, pax1=60, pax2=65, arc=360, nseg=2) #Outboard
print("Outboard:",mapdl.geometry.volumes)
anzahl_rollen= 2
mapdl.csys(1)
mapdl.vgen(itime=anzahl_rollen, nv1="ALL", dy=360/anzahl_rollen, imove=0)
mapdl.vsel("ALL")
#Inboard
mapdl.vsel("NONE")
mapdl.vrotat(a_r_ib, pax1=70, pax2=75, arc=360, nseg=2) #Inboard
print("Inboard:",mapdl.geometry.volumes)
mapdl.csys(1)
mapdl.vgen(itime=anzahl_rollen, nv1="ALL", dy=360/anzahl_rollen, imove=0)
mapdl.vsel("ALL")
mapdl.vplot()
# mapdl.exit() |
Beta Was this translation helpful? Give feedback.
Hi @herttim
I am missing some parameters like
of
andanzahl_rollen
.But setting those to
0
and2
respectively, I get this plot:However, I believe your problem is related to plotting (many
Windows fatal exception: access violation
are). Are you on latest PyMAPDL version?Code used to get VPLOT