f3dasm_simulate.abaqus.microstructure_generator.MicrostructureGenerator
- class MicrostructureGenerator[source]
Bases:
object
base class of mirostructure generator
List of Public Methods
2d rve plot for circle inclusion
generating micro-structure
plot figure for RVE
contour or voxel plot of the discrete microstructure
generate coordinate of sphere
plot 3d rve with sphere inclusion
convert microstructure to abaqus format
convert microstructure to crate format
Methods
- static circle_plot(fibers, length, width, vol_frac, save_figure=False, fig_name='microstructure.png', **kwargs)[source]
2d rve plot for circle inclusion
- Parameters:
- Return type:
- generate_microstructure(seed=None)[source]
generating micro-structure
- Parameters:
seed (any, optional) – seed generator or number , by default None
- Return type:
- plot_microstructure(save_figure=False, fig_name='RVE.png')[source]
plot figure for RVE
- Parameters:
- Raises:
NotImplementedError – error report
- Return type:
- rgmsh_plot(save_fig=False, fig_name='rgmsh.png', **kwarg)[source]
contour or voxel plot of the discrete microstructure
- static sphere_coordinate(location_information)[source]
generate coordinate of sphere
- Parameters:
location_information (np.ndarray) – a numpy array contains center and radius info of a sphere [x, y, z, r]
Returns –
-------ss –
tuple – coordinate of x, y, z
- Return type:
- sphere_plot(fibers, length, width, height, vol_frac, save_figure=False, fig_name='cubic.png')[source]
plot 3d rve with sphere inclusion
- Parameters:
location_information (np.ndarray) – location information
length (float) – length of cubic
width (float) – width of cubic
height (float) – height of cubic
vol_frac (float) – volume fraction
save_figure (bool, optional) – a flag to indicate if we want save the figure or not, by default False
fig_name (str, optional) – fig name, by default “cubic_rve.png”
- Return type:
- to_abaqus_format(file_name='micro_structure_info.json')[source]
convert microstructure to abaqus format
- Parameters:
file_name (str, optional) – file name, by default “micro_structure_info.json”
- Raises:
NotImplementedError – error report
- Return type: