
%Ok, start defining model BC 
disp('      boundary conditions for thermal model ');
if strcmp(md.type,'3d')
	pos1=find(md.elementonbed);     md.gridondirichlet_thermal(md.elements(pos1,1:3))=1; md.dirichletvalues_thermal(md.elements(pos1,1:3))=10;
	pos2=find(md.elementonsurface); md.gridondirichlet_thermal(md.elements(pos2,4:6))=1; md.dirichletvalues_thermal(md.elements(pos2,4:6))=0;
	md.vx=zeros(md.numberofgrids,1);
	md.vy=zeros(md.numberofgrids,1);
	md.vz=zeros(md.numberofgrids,1);
	md.vel=zeros(md.numberofgrids,1);
	md.pressure=zeros(md.numberofgrids,1);
else
	error('model must be 3d to be thermaly parameterized')
end
