usnistgov / fipy

FiPy is a Finite Volume PDE solver written in Python
http://pages.nist.gov/fipy/en/latest
Other
504 stars 148 forks source link

Is there a example for Robin boundary condition? #959

Closed CalebDmArcher closed 11 months ago

CalebDmArcher commented 11 months ago

Hi, I am trying to include a Robin boundary condition in my code. Are there any examples of it?

I am trying to simulate free air convection on a material boundary for a thermal model. for the cells right on the surfaces, there is the boundary condition which can be illustrated by the equation 'k(dT/dx) = h(T-T_ambient)'. T is the solution variable that the program needs to be calculated. Other variables in the equation (k, h, dx, T_ambient) are known. A brief explanation for this equation is that the left side of the equation is the heat conduction between the current cell and the adjacent cell, and the right side is the heat convection between the current cell and the ambient with a value T_ambient.

The above situation is neither Dirichlet nor Neumann boundary conditions, i.e. it is not a constant value on the boundary nor a constant derivative of the solution variable on the boundary. Instead, the derivative of the solution variable on the boundary depends on the value of the solution variable itself, which is dT/dx = (h/k)*(T-T_ambient).

Plus, since it is free air convection, the convection happens in every direction.

Could anyone help me? I need to implement the thermal model for a 3D system. So a 2D or 3D example would be great!

guyer commented 11 months ago

Please see Applying Robin boundary conditions