Meshing time #510
-
Good day I am busy with a modal analysis of a pipe. Currently I am creating the cylinder, defining the element type and material properties, setting the smart element sizing and meshing the pipe. My problem is that any value for the smart element sizing below 9 makes the meshing process very long( going form 1sec for meshing to nearly 3min). I need to make the mesh more fine to increase the accuracy of the results but this process needs to be repeated for many different geometry setups. Is there another way of meshing my pipe? Thank you very much for your time and help. Here is my code. It is only setup for one geometry now as I want to first get the basic code right before adding it to a for loop: from ansys.mapdl import core as pymapdl
import time
mapdl = pymapdl.launch_mapdl(nproc=4)
mapdl.units('SI')
def create_geometry(inner_dia,outer_dia,heigth,density,posrat,youngmod):
mapdl.clear()
mapdl.prep7()
mapdl.cyl4(xcenter=0,ycenter=0,rad1=inner_dia,rad2=outer_dia,depth=heigth)
mapdl.et(1,"SOLID187")
mapdl.mp('DENS',1,density)
mapdl.mp('NUXY',1,posrat)
mapdl.mp('EX',1,youngmod)
mapdl.smrtsize(9)
mapdl.vmesh('all')
start_time = time.time()
create_geometry(inner_dia=((35.6/2)/1000), outer_dia=((38/2)/1000), heigth=0.97,density=7750,posrat=0.31,youngmod=193E9)
print('...')
geo_time = time.time()
mapdl.modal_analysis(nmode=10,freqb=10)
mod_time = time.time()
print('...')
result = mapdl.result
print(result.solution_info(2)['timfrq'])
print('...')
end_time=time.time()
tot_time = end_time-start_time
totgeo_time = geo_time-start_time
totmod_time = mod_time-geo_time
print('geometry time:',totgeo_time)
print('Modal analysis time:',totmod_time)
print('Total time:',tot_time)
mapdl.exit() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 12 replies
-
You can try using a uniform mesh or control the mesh density directly using LESIZE and ESIZE. Here's an example for manual control of mesh density: Another note: you may want to run a simple convergence study by varying the mesh density, solving it, and observing when key parameters converge. |
Beta Was this translation helpful? Give feedback.
You can try using a uniform mesh or control the mesh density directly using LESIZE and ESIZE.
Here's an example for manual control of mesh density:
Smoothing Element Size Transitions
Another note: you may want to run a simple convergence study by varying the mesh density, solving it, and observing when key parameters converge.