27      $        
'module ['//trim(cnht_name)//
'] already registered')
 
   36      $        
'parent module ['//
'FRAME'//
'] not registered')
 
   41      $      
'Conjugated heat transfer tools')
 
   44       call rprm_sec_reg(cnht_sec_id,cnht_id,
'_'//adjustl(cnht_name),
 
   45      $     
'Runtime paramere section for conj. heat trans. tool module')
 
   50      $     
'Norm scaling factor',rpar_real,0,3.36558,.false.,
' ')
 
   53      $     
'Velocity scaling factor (Pareto curve)',
 
   54      $     rpar_real,0,0.5,.false.,
' ')
 
   57      $     
'Temperature scaling factor (Pareto curve)',
 
   58      $     rpar_real,0,0.5,.false.,
' ')
 
   61      $     
'X component of gravitational field',
 
   62      $     rpar_real,0,0.0,.false.,
' ')
 
   65      $     
'Y component of gravitational field',
 
   66      $     rpar_real,0,1.0,.false.,
' ')
 
   68       if (if3d) 
call rprm_rp_reg(cnht_gz_id,cnht_sec_id,
'GRZ',
 
   69      $     
'Z component of gravitational field',
 
   70      $     rpar_real,0,0.0,.false.,
' ')
 
  100      $        
'module ['//trim(cnht_name)//
'] already initiaised.')
 
  105       call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_sc_id,rpar_real)
 
  107       call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_sv_id,rpar_real)
 
  109       call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_st_id,rpar_real)
 
  112       call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_gx_id,rpar_real)
 
  114       call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_gy_id,rpar_real)
 
  117          call rprm_rp_get(itmp,rtmp,ltmp,ctmp,cnht_gz_id,rpar_real)
 
  122       cnht_ra = abs(param(2))
 
  123       cnht_ra = abs(param(1))
 
  132       call gradm1(dtdx,dtdy,dtdz,t)
 
  181             rtmp = t(ix,iy,iz,iel,ifield)/cpfld(1,2)
 
  182             ffx = ffx + cnht_gx*rtmp
 
  183             ffy = ffy + cnht_gy*rtmp
 
  184             if (if3d) ffz = ffz + cnht_gz*rtmp
 
  186             ip=ix+nx1*(iy-1+ny1*(iz-1+nz1*(iel-1)))
 
  188                rtmp = tp(ip,ifield,jp)/cpfld(1,2)
 
  189                ffx = ffx + g_adj(1)*rtmp
 
  190                ffy = ffy + g_adj(2)*rtmp
 
  191                if (if3d) ffz = ffz + g_adj(3)*rtmp
 
  193                ffx = ffx - dtdx(ip)*tp(ip,ifield,jp)
 
  194                ffy = ffy - dtdy(ip)*tp(ip,ifield,jp)
 
  195                if (if3d) ffz = ffz - dtdz(ip)*tp(ip,ifield,jp)
 
  215             cpfld(1,1)=cnht_ra/sqrt(cnht_ra)
 
  218             cpfld(2,1)=1.0/sqrt(cnht_ra)
 
  221             cpfld(1,1)=1.0/sqrt(cnht_ra)
 
  222             cpfld(1,2)=1.0/cnht_ra
 
  224             cpfld(2,1)=1.0/sqrt(cnht_ra)
 
  228          if (param(2).lt.0.0) 
then 
  229             cpfld(1,1) = -1.0/param(2)
 
  231             cpfld(1,1) = param(2)
 
  234          if (param(1).lt.0.0) 
then 
  235             cpfld(1,2) = -1.0/param(1)
 
  237             cpfld(1,2) = param(1)
 
  255       real a1(1),a2(1),a3(1),a4(1)
 
  260       ntotv = nx1*ny1*nz1*nelv
 
  261       ntott = nx1*ny1*nz1*nelt
 
  266          if(if3d) 
call rzero(a3,ntotv)
 
  268       if (ifheat) 
call rzero(a4,ntott)
 
  285       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  290       ntotv = nx1*ny1*nz1*nelv
 
  291       ntott = nx1*ny1*nz1*nelt
 
  294          call copy(a1,b1,ntotv)
 
  295          call copy(a2,b2,ntotv)
 
  296          if(if3d) 
call copy(a3,b3,ntotv)
 
  298       if (ifheat) 
call copy(a4,b4,ntott)
 
  316       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  321       ntotv = nx1*ny1*nz1*nelv
 
  322       ntott = nx1*ny1*nz1*nelt
 
  325          call add2(a1,b1,ntotv)
 
  326          call add2(a2,b2,ntotv)
 
  327          if(if3d) 
call add2(a3,b3,ntotv)
 
  329       if (ifheat) 
call add2(a4,b4,ntott)
 
  347       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  352       ntotv = nx1*ny1*nz1*nelv
 
  353       ntott = nx1*ny1*nz1*nelt
 
  356          call sub2(a1,b1,ntotv)
 
  357          call sub2(a2,b2,ntotv)
 
  358          if(if3d) 
call sub2(a3,b3,ntotv)
 
  360       if (ifheat) 
call sub2(a4,b4,ntott)
 
  373       subroutine cnht_opsub3 (a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4)
 
  380       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  381       real c1(1),c2(1),c3(1),c4(1)
 
  386       ntotv = nx1*ny1*nz1*nelv
 
  387       ntott = nx1*ny1*nz1*nelt
 
  390          call sub3(a1,b1,c1,ntotv)
 
  391          call sub3(a2,b2,c2,ntotv)
 
  392          if(if3d) 
call sub3(a3,b3,c3,ntotv)
 
  394       if (ifheat) 
call sub3(a4,b4,c4,ntott)
 
  411       real a1(1),a2(1),a3(1),a4(1)
 
  417       ntotv = nx1*ny1*nz1*nelv
 
  418       ntott = nx1*ny1*nz1*nelt
 
  421          call cmult(a1,const,ntotv)
 
  422          call cmult(a2,const,ntotv)
 
  423          if(if3d) 
call cmult(a3,const,ntotv)
 
  425       if (ifheat) 
call cmult(a4,const,ntott)
 
  443       real a1(1),a2(1),a3(1),a4(1)
 
  449       ntotv = nx1*ny1*nz1*nelv
 
  450       ntott = nx1*ny1*nz1*nelt
 
  453          call cmult(a1,const1,ntotv)
 
  454          call cmult(a2,const1,ntotv)
 
  455          if(if3d) 
call cmult(a3,const1,ntotv)
 
  457       if (ifheat) 
call cmult(a4,const2,ntott)
 
  475       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  482       ntotv = nx1*ny1*nz1*nelv
 
  483       ntott = nx1*ny1*nz1*nelt
 
  488                a1(il) = a1(il) + b1(il)*coeff
 
  489                a2(il) = a2(il) + b2(il)*coeff
 
  490                a3(il) = a3(il) + b3(il)*coeff
 
  494                a1(il) = a1(il) + b1(il)*coeff
 
  495                a2(il) = a2(il) + b2(il)*coeff
 
  501             a4(il) = a4(il) + b4(il)*coeff
 
  521       real a1(1),a2(1),a3(1),a4(1),b1(1),b2(1),b3(1),b4(1)
 
  528       ntotv = nx1*ny1*nz1*nelv
 
  529       ntott = nx1*ny1*nz1*nelt
 
  534                a1(il) = a1(il) - b1(il)*coeff
 
  535                a2(il) = a2(il) - b2(il)*coeff
 
  536                a3(il) = a3(il) - b3(il)*coeff
 
  540                a1(il) = a1(il) - b1(il)*coeff
 
  541                a2(il) = a2(il) - b2(il)*coeff
 
  547             a4(il) = a4(il) - b4(il)*coeff
 
  566       real lvx(1),lvy(1),lvz(1),lt(1)
 
  572       f1=cnht_sv/volvm1/coeff
 
  573       f2=cnht_st*cnht_sc/voltm1/coeff
 
  598       real b1(1),b2(1),b3(1),b4(1),x1(1),x2(1),x3(1),x4(1),wt(1)
 
  607       ntotv = nx1*ny1*nz1*nelv
 
  608       ntott = nx1*ny1*nz1*nelt
 
  616       f2=cnht_st*cnht_sc/voltm1
 
  623                   sum = sum + wt(il)*(f1*(b1(il)*x1(il)+b2(il)*x2(il)
 
  624      &                 +b3(il)*x3(il))+f2*b4(il)*x4(il))
 
  628                   sum =sum + wt(il)*(f1*(b1(il)*x1(il)+b2(il)*x2(il))
 
  634             if (ntott.gt.ntotv) 
then 
  636                   sum = sum + wt(il)*f2*b4(il)*x4(il)
 
  642                  sum = sum + wt(il)*f1*(b1(il)*x1(il)+
 
  643      $                b2(il)*x2(il)+b3(il)*x3(il))
 
  647                  sum = sum + wt(il)*f1*(b1(il)*x1(il)+b2(il)*x2(il))
 
  654                sum = sum + wt(il)*(f2*b4(il)*x4(il))
 
integer function gllel(ieg)
 
subroutine cnht_opsub2cm(a1, a2, a3, a4, b1, b2, b3, b4, coeff)
Vector subtraction with scaling A = A-c*B (velocity and temperature)
 
subroutine cnht_opcopy(a1, a2, a3, a4, b1, b2, b3, b4)
Copy vectors A=B (velocity and temperature)
 
subroutine cnht_opsub3(a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4)
Subtract vectors A = B-C (velocity and temperature)
 
subroutine cnht_register()
Register conjugated heat transfer tools module.
 
subroutine cnht_opcmult2c(a1, a2, a3, a4, const1, const2)
Multiply vector by constant A = c*A with separate const. for velocity and temperature.
 
subroutine cnht_opcmult(a1, a2, a3, a4, const)
Multiply vector by constant A = c*A (single coeff. for velocity and temperature)
 
subroutine cnht_opsub2(a1, a2, a3, a4, b1, b2, b3, b4)
Subtract vectors A = A-B (velocity and temperature)
 
subroutine cnht_opadd2(a1, a2, a3, a4, b1, b2, b3, b4)
Add velocity and temperature vectors A = A+B.
 
subroutine cnht_opadd2cm(a1, a2, a3, a4, b1, b2, b3, b4, coeff)
Vector summation with scaling A = A+c*B (velocity and temperature)
 
subroutine cnht_cpfld_set()
Set cpfld coefficient for given type of simulation.
 
subroutine cnht_init()
Initilise conjugated heat transfer tools module.
 
subroutine cnht_oprzero(a1, a2, a3, a4)
Zero velocity and temperature vectors.
 
real function cnht_glsc2_wt(b1, b2, b3, b4, x1, x2, x3, x4, wt)
Global inner product of velocity and temperature fields.
 
subroutine cnht_weight_fun(lvx, lvy, lvz, lt, coeff)
Weigth velocity and temperature fields.
 
subroutine cnht_forcing(ffx, ffy, ffz, ix, iy, iz, ieg)
Calcualte forcing ralted to conjugated heat transfer.
 
logical function cnht_is_initialised()
Check if module was initialised.
 
subroutine mntr_warn(mid, logs)
Write warning message.
 
subroutine mntr_mod_is_name_reg(mid, mname)
Check if module name is registered and return its id.
 
subroutine mntr_abort(mid, logs)
Abort simulation.
 
subroutine mntr_mod_reg(mid, pmid, mname, mdscr)
Register new module.
 
subroutine rprm_rp_get(ipval, rpval, lpval, cpval, rpid, ptype)
Get runtime parameter form active section. This operation is performed locally.
 
subroutine rprm_rp_reg(rpid, mid, pname, pdscr, ptype, ipval, rpval, lpval, cpval)
Register new runtime parameter.
 
subroutine rprm_sec_set_act(ifact, rpid)
Set section's activation flag. Master value is broadcasted.
 
subroutine rprm_sec_reg(rpid, mid, pname, pdscr)
Register new parameter section.
 
subroutine sub3(a, b, c, n)
 
subroutine cmult(a, const, n)
 
subroutine gradm1(ux, uy, uz, u)