On 03. 05. 20 14:06, michael.baumgart@ait.ac.at wrote:
Hey Robert,
thanks for all the hints, they look very promising to me!
Basically, the coupling boundary condition I want to impose set the heat flux on surfaces (facets) that contribute to the radiative heat exchange.
Consider an already discretized surface with N_r discrete surface/facet elements. The heat flux density on the i-th element is defined as q_i = \sum_j=1^N_r P_ij T_j^4, for i,j =1,...,N_r where T_j is some representative temperature of the j-th surface/facet and P_ij are some coefficients which are identified by some other means. Ideally, this is done using the same mesh as for solving the pde. And here are the open points to me...
OK
To begin with, I would set the fluxes q_i constant during a time step and update them using a step_hook_function (items 1 and 2 of the following)
I would proceed as follows
- determine all representative temperatures on the contributing surfaces/facets with something like this: out = problem.create_evaluable('ev_volume_integrate.i1.Omega(u)') ([2])
Here you would need a surface region, not the whole domain Omega. Also I would advise to use the 'qp' evaluation mode to get the values in the quadrature points.
- compute the fluxes q_i with my mapping derived elsewhere
- specify a flux function using the numerical fluxes q_i as custom parameter and applying it similar to the example in [1]
My main concern is now the right order of the mapping between the temperature vector as result of problem.create_evaluable('ev_volume_integrate.i1.Omega(u)') and finally the coors of the quadrature point in the calls of the flux functions.
Frankly: How do I now which eval-result or quadrature point belongs to which element? Because the P_ij have some order (according to some element numbering), I depend on that order when getting temperatures or setting fluxes. Moreover, the radiative boundaries are only a subset of all boundaries. So how can I manage my i and j when using with the sfepy procedures?
All evaluations are governed by the regions that are used - see region.cells, region.facets etc. Use print(region) to see all the attributes, also see below. BTW. besides region methods, for queries like "get vertices of given region facets", the region.domain.cmesh object can be used.
Did I bring my point across?
Let's see :) I have modified [1] (attached) to resemble what you described - the function get_flux() evaluates the temperature in the quadrature points of the source region Gamma_N0, and computes q_i for the destination region reg_dest = the region of the dw_surface_integrate.i.Gamma_N(flux.val, s) term in the equations. t_src has the (n_facet, n_qp, 1, 1) shape. The correct shapes are ensured by using the same integral (quadrature order) in all the evaluations. Note that p_ij used in the example are nonsensical - I just just something that does not blow up.
r.
Thanks Michael
[1] http://sfepy.org/doc-devel/examples/diffusion-poisson_neumann.html#usage-exa... [2] https://sfepy.org/doc-devel/src/sfepy/discrete/problem.html