Hi Ben,
On 03/02/2018 01:21 AM, Ben Melosh wrote:
Hi SfePy community,
I am attempting model stress and strain rate variations over a region (Omega) that contains sub-regions (Omega1 and Omega2) with different viscosities.
I have a general understanding of this mathematically, but i am still unsure the exact equations used by SfePy to calculate this. So far my model is largely based on the Navies-Stokes example provided in SfePy with the circle_in_square mesh (example here: https://pastebin.com/VZrEKVFZ). Ultimately I would like to be able to model linear and power law viscous flow, is this possible with the existing equations in SfePy?
More specific questions:
What are default units for pressure (p) the values range from ~ -50 to 50? How can I change or specify units if i need to?
SfePy does not handle units at all, so the units of the results are determined by units of the input parameters (material constants, loads, etc.). For example, SI units on input -> SI units on output. Note that all the input units need to be consistent. Some consistent unit sets: http://www.eng-tips.com/viewthread.cfm?qid=355753
How do you calculate strain rate? Can I use the GradTerm class to do this?: sr = problem.evaluate('ev_grad.i.Omega(u)', mode='el_avg')
I do not understand what you mean by the strain rate, because the solution of your problem does not depend on time. Maybe you just need the ev_cauchy_strain applied to the velocity u?
When I try to calculate Cauchy stress i get error:
ValueError: wrong arguments shapes for "+1.00e+00 * ev_cauchy_stress.4.Omega(fluid.viscosity, u)" term!
I think this is because ev_cauchy_stress requires a 3x3 matrix material and I have input a single viscosity value? What is the best way to solve this?
Try using stiffness_from_lame() (see examples/linear_elasticity/linear_elastic.py) - in linear isotropic elasticity, the stress is, given the Lame parameters lambda, mu:
sigma = lambda tr(e) I + 2 mu e
and in incompressible fluid:
sigma = -p I + 2 mu e(velocity)
so I guess you could set lambda = 0, and mu to the viscosity to get the shear stress part using ev_cauchy_stress.
r.