On 03/14/2018 11:55 PM, Ben Melosh wrote:
Yes this helps and appears to work, but leads me to a new issue.
In both the case of newtonian and a non-newtonian (ie. nonlinear parameter depending on velocity) models, the post_process() and get_pars() functions evaluate an equation over a the entire mesh ('Omega' : 'all'). How do i evaluate different equations over regions of the mesh (e.g. 'Omega1' : 'cells of group 1').
For example, here is something i have tried:
stress = problem.evaluate('ev_cauchy_stress.i.Omega1(viscosity1.D, u) + ev_cauchy_stress.i.Omega2(viscosity2.D, u)', mode='el_avg') out['cauchy_stress'] = Struct(name='output_data', mode='cell', data=stress, dofs=None)
this leads to an error that operands could not be broadcast together with different shapes.
Check the post_process() function in example  - you need to extend the values to the whole domain, if you want to save the values to the results file.
In the case of a non-newtonian simulation this is especially relevant and important as I want to simulate flow in two different regions with different viscosities. The get_pars() shown in example  in your reply only deals with one, how do i apply this to two regions of a single mesh?
It is true, that you get the coefficient (mu in the example ) in the whole domain, but in your case the array will have different values in Omega1 and Omega2. So will not be the viscosity also different automatically?