A Nonlinear Problem - Radiation :

Heat loss through radiation is a loss proportional to the absolute temperature to the fourth power (Stefan's Law). This adds to the loss by convection and gives the following boundary condition: $$\kappa{\partial u\over \partial n} +\alpha(u-u_e) + c[(u + 273)^4 - (u_e+273)^4] = 0$$

The problem is nonlinear, and must be solved iteratively. If $$m$$ denotes the iteration index, a semi-linearization of the radiation condition gives $${\partial u^{m+1}\over \partial n} + \alpha(u^{m+1}-u_e)+ c(u^{m+1}-u_e) (u^m+u_e +546) ((u^m + 273)^2 + (u_e+273)^2) = 0,$$ because we have the identity $$a^4 - b^4 = (a-b)(a+b)(a^2+b^2)$$. The iterative process will work with $$v=u-u_e$$.

 ...
fespace Vh(Th,P1);  //  finite element space
real rad=1e-8, uek=ue+273; // def of the physical constants
Vh vold,w,v=u0-ue,b;
= int2d(Th)(v*w/dt + k*(dx(v) * dx(w) + dy(v) * dy(w)))
+ int1d(Th,1,3)(b*v*w)
- int2d(Th)(vold*w/dt) + on(2,4,v=u0-ue);

for(real t=0;t<T;t+=dt){
vold=v;
for(int m=0;m<5;m++){
b= alpha + rad * (v + 2*uek) * ((v+uek)^2 + uek^2);
}
}
vold=v+ue; plot(vold);