-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi Mr. Shi,
I come again with another question regarding ElasticPerfectlyPlastic material model as I'm trying to simulate an elastic-plastic material in another simulation.
I found no example on how to use this model, but I can see some development on infinitesimal_strain folder .
To test, I choose the MPM example ULBar.py.
In it, the only modification I'm producing on the script is to define the beam material as:
mpm.add_material(
model="ElasticPerfectlyPlastic",
material={
"MaterialID": 1,
"Density": 2650.,
"YoungModulus": 2e7,
"PossionRatio": 0.3,
"YieldStress": 5e4
})I run the example as
$ python ULBar.py and obtained the following log
[Taichi] version 1.7.3, llvm 15.0.4, commit 5ec301be, linux, python 3.11.11
Using device x86_64 (Core: 128, Logic: 128)
[Taichi] Starting on arch=x64
# =================================================================== #
# #
# Welcome to GeoTaichi -- Material Point Method Engine ! #
# #
# A High Performance Multiscale and Multiphysics Simulator #
# #
# =================================================================== #
----------------------- MPM Basic Configuration -----------------------
Simulation Type: Arch.x64
Simulation Domain: [5. 3. 5.]
Boundary Condition: [-1, -1, -1]
Gravity: [ 0. 0. -9.8]
------------------------ MPM Solver Information -----------------------
Initial Simulation Time: 0.0
Finial Simulation Time: 6.0
Time Step: 1e-05
Save Interval: 0.05
Save Path: OutputData
------------------------ MPM Engine Information -----------------------
Background Damping: 0.02
alpha Value: 0.0
Stabilization Technique: None
Boundary Direction Detection: False
Free Surface Detection: False
Mapping Scheme: USF
Shape Function: Linear
Velocity Projection: PIC/FLIP
-------------------- Constitutive Model Information -------------------
Constitutive model: Elastic Perfectly Plastic Model
Model ID: 1
Density: 2650.0
Young Modulus: 20000000.0
Poisson Ratio: 0.3
Yield Stress: 50000.0
--------------------------- Grid Information --------------------------
Grid Type: Rectangle
The number of grids = 1
Grid Size = [0.1 0.1 0.1]
The number of nodes = [51 31 51]
-------------------------- Region Information -------------------------
Region Name: region1
Region Type: Rectangle
Bounding Box: [0.5 1. 3.5] [4.2 0.5 0.5]
Rotate angle: [0. 0. 0.]
# Start adding material points ......
Traceback (most recent call last):
File "/gpfs/projects/cenaero/p_virtuallab_anim/geoTaichi_SFI_runs/cantilever/ULBar.py", line 58, in <module>
mpm.add_body(body={
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/mpm/mainMPM.py", line 170, in add_body
self.generator.add_body(body, self.sims, self.scene)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/mpm/GenerateManager.py", line 54, in add_body
generator.begin(scene)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/mpm/generator/BodyGenerator.py", line 65, in begin
self.add_body(scene)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/mpm/generator/BodyGenerator.py", line 133, in add_body
self.generate_material_points(scene, self.myTemplate)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/mpm/generator/BodyGenerator.py", line 223, in generate_material_points
scene.material.state_vars_initialize(materialID, particleNum, particleNum+particle_count, scene.particle)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/physics_model/consititutive_model/ConstitutiveModelBase.py", line 52, in state_vars_initialize
kernel_initial_state_variables(start_particle, end_particle, particle, self.matProps[materialID], self.stateVars)
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/ti17/lib64/python3.11/site-packages/taichi/lang/kernel_impl.py", line 1117, in wrapped
raise type(e)("\n" + str(e)) from None
taichi.lang.exception.TaichiCompilationError:
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/physics_model/consititutive_model/MaterialKernel.py", line 38, in kernel_initial_state_variables:
matProps._initialize_vars(np, particle, stateVars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/src/physics_model/consititutive_model/infinitesimal_strain/ElasticPerfectlyPlastic.py", line 99, in _initialize_vars_update_lagrangian:
stateVars[np].epdstrain = 0.
^^^^^^^^^^^^^^^^^^^^^^^
Traceback (most recent call last):
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/ti17/lib64/python3.11/site-packages/taichi/lang/ast/ast_transformer_utils.py", line 27, in __call__
return method(ctx, node)
^^^^^^^^^^^^^^^^^
File "/gpfs/home/cenaero/mdiaz/Depots/GeoTaichi_v04/ti17/lib64/python3.11/site-packages/taichi/lang/ast/ast_transformer.py", line 1040, in build_Attribute
node.ptr = getattr(node.value.ptr, node.attr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: '_IntermediateStruct3' object has no attribute 'epdstrain'
Thus, my question(s):
- Is this model working or complete? or
- is there a way to fix this missing attribute?
kind regards.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels