Dear SfePy Users,
I want to solve a thermal problem with the following issues
- several separated regions (bodies) that
- exchange heat via radiation and
- have anisotropic, temperature dependend material properties.
The core of this problem is that the boundary conditions (heat flux given by radiation) are non-local, i.e. they depend on the dependent variable (temperature) of other boundary regions.
Can I solve this kind of problem with SfePy?
Thanks for input Michael
Thanks Michael
Hello Michael,
On 29. 04. 20 17:46, michael.baumgart@ait.ac.at wrote:
Dear SfePy Users,
I want to solve a thermal problem with the following issues
- several separated regions (bodies) that
- exchange heat via radiation and
- have anisotropic, temperature dependend material properties.
The core of this problem is that the boundary conditions (heat flux given by radiation) are non-local, i.e. they depend on the dependent variable (temperature) of other boundary regions.
How do you plan to resolve the nonlinearity?
Can I solve this kind of problem with SfePy?
IMO the necessary ingredients to create the matrices, integrate the heat flux etc. are (*) available, but you would need to build the complete problem, including the nonlinear iteration, yourself.
Best regards, r.
(*) I have no experience with radiation heat flux, so take this with the grain of salt.
Thanks for input Michael
Hello Robert,
ok, solving the nonlinear system should be ok.
But could you give me a hint how to define non-contiguous regions and boundary conditions that depend on other regions/boundaries?
Thanks! Michael
Hi Michael,
On 30. 04. 20 10:35, michael.baumgart@ait.ac.at wrote:
Hello Robert,
ok, solving the nonlinear system should be ok.
But could you give me a hint how to define non-contiguous regions and boundary conditions that depend on other regions/boundaries?
Non-contiguous regions are not problem, you can select the surface entities as needed [1].
Do you need Dirichlet boundary conditions, or Neumann?
If Dirichlet, have a look at [2], and then [3]. Essentially, you can use a function that sets the boundary conditions, and this function has access to the whole problem, including the variables with their current values. There is IIRC no example for that for the Dirichlet boundary conditions, but check [4] (get_pars()) - an analogous function can be used directly for the Neumann boundary conditions (your fluxes?), as the flux is given as a material parameter.
Does it help?
r.
[1] https://sfepy.org/doc-devel/users_guide.html#topological-entity-selection [2] https://sfepy.org/doc-devel/users_guide.html#dirichlet-boundary-conditions [3] https://sfepy.org/doc-devel/users_guide.html#functions [4] https://sfepy.org/doc-devel/examples/linear_elasticity-material_nonlinearity...
Thanks! Michael
SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mailman3/lists/sfepy.python.org/
Hi all,
I am currently trying to solve a 1D heat diffusion problem in Python.
I solved the problem already in MATLAB which is more or less similar to the documented example shown here:
https://de.mathworks.com/help/matlab/math/solve-system-of-pdes.html
I need to calculate the heat diffusion in 1D on one to many (generally up to four) coupled systems. The material parameters need to be temperature/field dependent and the material is piece-wise homogeneous (nanostructures). I also need Dirichlet as well as von Neumann boundary conditions.
I was wondering, if someone has already done something similar and could give me a hint how to start with that problem?
Best wishes
Daniel
Hi Daniel,
I have not done similar calculations, but check this example [1], maybe it helps.
r. [1] https://sfepy.org/doc-devel/examples/diffusion-poisson_field_dependent_mater...
On 30. 04. 20 14:52, Daniel Schick wrote:
Hi all,
I am currently trying to solve a 1D heat diffusion problem in Python.
I solved the problem already in MATLAB which is more or less similar to the documented example shown here:
https://de.mathworks.com/help/matlab/math/solve-system-of-pdes.html
I need to calculate the heat diffusion in 1D on one to many (generally up to four) coupled systems. The material parameters need to be temperature/field dependent and the material is piece-wise homogeneous (nanostructures). I also need Dirichlet as well as von Neumann boundary conditions.
I was wondering, if someone has already done something similar and could give me a hint how to start with that problem?
Best wishes
Daniel
SfePy mailing list -- sfepy@python.org To unsubscribe send an email to sfepy-leave@python.org https://mail.python.org/mailman3/lists/sfepy.python.org/
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...
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])
- 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?
Did I bring my point across?
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
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
participants (3)
-
Daniel Schick
-
michael.baumgart@ait.ac.at
-
Robert Cimrman