Hi Dennis,
On 08/11/2015 04:36 PM, Dennis Perchak wrote:
Hi Robert,
I think I tried that. I modified your function for stress-strain as
def stress_strain(out, pb, state, extend=False):
"""
Calculate and output strain and stress for given displacements.
"""
from sfepy.base.base import Struct
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
ev = pb.evaluate
strain = ev('ev_cauchy_strain.2.Omega(u)', mode='el_avg')
stress = ev('ev_cauchy_stress.2.Omega(solid.D, u)', mode='el_avg')
pstress = ev('dw_piezo_coupling.2.Omega( solid.coupling, u, psi )', mode='el_avg')
out['cauchy_strain'] = Struct(name='output_data', mode='cell',
data=strain, dofs=None)
out['cauchy_stress'] = Struct(name='output_data', mode='cell',
data=stress, dofs=None)
out['piezo_stress'] = Struct(name='output_data', mode='cell',
data=pstress, dofs=None)
etc....
and it returned an error of "ValueError: unsupported evaluation mode in dw_piezo_coupling! (el_avg)"
You are right, sorry for misleading you. I was looking too briefly at the term.
I will implement that soon(ish) - it should definitely be possible.
r.