-
Hello, I want to export convection components from a pyansys simulation: mapdl = launch_mapdl(loglevel="ERROR")
mapdl.cwd(dirpath=path_solve)
mapdl.clear()
mapdl.prep7()
mapdl.keyw()
# Defined materials
kxx_pin = 1 # W/(m degC)
kyy_pin = 1 # W/(m degC)
kzz_pin = 0.7# W/(m degC)
rho_pin = 2400 # kg/(m^3)
cp_pin = 500 # J/(kg degC)
mapdl.mp("KXX",1,kxx_pin)
mapdl.mp("KYY",1,kyy_pin)
mapdl.mp("KZZ",1,kzz_pin)
mapdl.mp("DENS",1,2400)
mapdl.mp("C",1,500)
# Defined geometry + mesh
mapdl.et(1, "SOLID70")
mapdl.block(0, 0.02, 0, 0.02, 0, 0.01)
mapdl.lesize("ALL", ndiv='19')
mapdl.mshape(0, "3D")
mapdl.mshkey(1)
mapdl.vmesh(1)
mapdl.nsel('S','loc','z','0.01')
mapdl.cm('convection','node')
mapdl.sf('convection','CONV','10','25')
mapdl.allsel()
mapdl.nsel('S','loc','z','0')
mapdl.cm('load','node')
# mapdl.f("load", lab="HEAT", value=0.001)
mapdl.allsel()
mapdl.allsel()
mapdl.allsel()
mapdl.mesh.save('grid.vtk')
mapdl.run("CDWRITE,ALL,'model','cdb',,'model','iges'")
# Enter solver and specify options
mapdl.slashsolu()
mapdl.ematwrite("yes")
print(mapdl.antype(antype="MODAL"))
print(mapdl.modopt(method="damp", nmode="10", freqb="1."))
print(mapdl.wrfull(ldstep="1"))
mapdl.solve()
mapdl.finish()
import ansys.math.core.math as pymath
mm = pymath.AnsMath()
k = mm.stiff(fname=path)
K = np.array(k)
K = K + K.T - np.diag(K.diagonal())
m = mm.damp(fname=path)
M = np.array(m)
M = M + M.T - np.diag(M.diagonal())
convection = np.array(mm.rhs(fname=path)) There is no convection components in what i exported. If i am not wrong the K matrix has to be modified when we applied convection and it is not. Do you know how can i export convection component? Thx in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @sdurain you are a little wrong and a little right. For a pure modal analysis the K matrix is not updated so the applied load, convection, has no effect. In order to account for that a pre-stressed modal analysis is performed; where the pre-stressing is done in a static or transient analysis. Then the modal is some kind of restart/perturbation procedure. Solid70 does not support modal analysis (though it can be done in MAPDL/PyMAPDL via MAPDL Math as you are using). So instead of a modal do a quick tranaient analysis. Say at time=1 in one substep. Then the RHS of the full file should have the load vector. Mike |
Beta Was this translation helpful? Give feedback.
Hi @sdurain you are a little wrong and a little right. For a pure modal analysis the K matrix is not updated so the applied load, convection, has no effect. In order to account for that a pre-stressed modal analysis is performed; where the pre-stressing is done in a static or transient analysis. Then the modal is some kind of restart/perturbation procedure.
Solid70 does not support modal analysis (though it can be done in MAPDL/PyMAPDL via MAPDL Math as you are using).
So instead of a modal do a quick tranaient analysis. Say at time=1 in one substep. Then the RHS of the full file should have the load vector.
Mike