Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #106 from yangbai90/master
Browse files Browse the repository at this point in the history
add new damask notebook for different analysis
  • Loading branch information
max-hassani authored Mar 8, 2022
2 parents 0d5ff80 + 8109e41 commit bbb66ce
Show file tree
Hide file tree
Showing 5 changed files with 1,043 additions and 2 deletions.
352 changes: 352 additions & 0 deletions notebooks/damask_tutorial_elastoplasticity-isotropic.ipynb

Large diffs are not rendered by default.

333 changes: 333 additions & 0 deletions notebooks/damask_tutorial_elastoplasticity-powerlaw.ipynb

Large diffs are not rendered by default.

341 changes: 341 additions & 0 deletions notebooks/damask_tutorial_linearelastic.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions pyiron_continuum/damask/damaskjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ def _load_results(self, file_name="damask_loading.hdf5"):
self.output.strain = self.average_spatio_temporal_tensors('epsilon_V^0.0(F)')
self.output.stress_von_Mises = self.average_spatio_temporal_tensors('sigma_vM')
self.output.strain_von_Mises = self.average_spatio_temporal_tensors('epsilon_V^0.0(F)_vM')

def writeresults2vtk(self):
"""
save results to vtk files
"""
cwd = os.getcwd() # get the current dir
os.chdir(self.working_directory) # cd into the working dir
result=self._results
result.export_VTK()
os.chdir(cwd) # cd back to the notebook dir

def temporal_spatial_shape(self, name):
property_dict = self._results.get(name)
Expand Down
9 changes: 7 additions & 2 deletions pyiron_continuum/damask/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def homogenization(method, parameters):
return {method: parameters}

@staticmethod
def phase(composition, lattice, output_list, elasticity, plasticity):
def phase(composition, lattice, output_list, elasticity, plasticity=None):
"""
Returns a dictionary describing the phases for damask.
Args:
Expand All @@ -196,7 +196,12 @@ def phase(composition, lattice, output_list, elasticity, plasticity):
type='phenopowerlaw', xi_0_sl=[31e6],
xi_inf_sl=[63e6])
"""
return {composition: {'lattice': lattice,
if plasticity == None:
return {composition: {'lattice': lattice,
'mechanical': {'output': output_list,
'elastic': elasticity}}}
else:
return {composition: {'lattice': lattice,
'mechanical': {'output': output_list,
'elastic': elasticity,
'plasticity': plasticity}}}
Expand Down

0 comments on commit bbb66ce

Please sign in to comment.