material dependent on calculated field
Hi again,
I would like to calculate the electrical current flow through a material, whose electrical conductivity depends on temperature. I assume the current is very small and all the heating comes only from external bath.
The procedure is composed of these steps:
 the temperature field is calculated (it works)
 the electrical conductivity of a material should be now assigned using a get_pars function. It should take into account the temperature field. (but how?)
 the potential field is calculated (works)
 calculate the flux (works, you helped me before)
The temperature is calculated in nodes, but the material properties are assigned to cells. I will probably have to use make_l2_projection, but after many trials and errors I ask for help, again. I attach my testing script.
Thank you Jan
Hi Jan,
On 04/18/2018 12:34 PM, Jan Martinek wrote:
Hi again,
I would like to calculate the electrical current flow through a material, whose electrical conductivity depends on temperature. I assume the current is very small and all the heating comes only from external bath.
The procedure is composed of these steps:
 the temperature field is calculated (it works)
 the electrical conductivity of a material should be now assigned using a get_pars function. It should take into account the temperature field. (but how?)
 the potential field is calculated (works)
 calculate the flux (works, you helped me before)
The temperature is calculated in nodes, but the material properties are assigned to cells. I will probably have to use make_l2_projection, but after many trials and errors I ask for help, again. I attach my testing script.
The easiest way of obtaining a field in quadrature points is to use the ev_volume_integrate term (for volume regions):
t_qp = problem.evaluate('ev_volume_integrate.i.Omega(T)', integrals=Integrals([integral]), mode='qp', verbose=False) t_qp.shape = (1, 1, 1)
Just make sure, that the same integral is used above and in get_pars(). The reshaping is needed for get_pars().
Note that make_l2_projection() would work too, but it is meant for evaluating fields in arbitrary points  here it is an overkill.
r.
Thank you Jan
SfePy mailing list sfepy@python.org https://mail.python.org/mm3/mailman3/lists/sfepy.python.org/
participants (2)

Jan Martinek

Robert Cimrman