FINISH
/PREP7                                   !enter the model creation preprocessor

!********SURF152********
*GET,maxnode,NODE,0,NUM,MAX              !find the maximum number of nodes and put it in the parameter maxnode
N,maxnode+100,0,0,0                      !create a node with coordinates (0,0,0)which will be the SURF152 extra node
*GET,maxtype,ETYP,0,NUM,MAX              !find the maximum number pf types and put it in the parameter maxtype
ET,maxtype+1,152                         !define a SURF152 element with an element type maxtype+1
KEYOPT,maxtype+1,8,2                     !change the keyoption 8 to 2 of the SURF152 element
KEYOPT,maxtype+1,5,1                     !change the keyoption 5 to 1 of the SURF152 element
TYPE,maxtype+1                           !activate the surf152 type

CMSEL,S,Nodes_Fluid                      !select the nodes of the nameds selection Nodes_Fluid
ESURF,maxnode+100                        !generate SURF152 elements on the selected nodes and specify that xnode is the extra node
ALLSEL,ALL                               !select all the nodes and elements

ESEL,S,TYPE,,maxtype+1                   !select  the SURF152 elements
SFE,ALL,1,CONV,0,200                     !apply a convection with a film of coefficient of 200 W.m-2.K-1
ALLSEL,ALL                               !select all the nodes and elements

!********MASS71********
ET,maxtype+2,71                          !define a MASS71 element with an element type maxtype+2
KEYOPT,maxtype+2,3,1                     !change the keyoption 3 to 1 of the MASS71 element

VOLUME=6.9944e-004                       !parameter that defines the volume of the fluid
SPECIFIC_HEAT=4200                       !parameter that defines the specific heat of the fluid
DENSITY=1000                             !parameter that defines the density of the fluid
R,maxtype+2,VOLUME*SPECIFIC_HEAT*DENSITY !defining the thermal capacitance of the fluid as a real

TYPE,maxtype+2
REAL,maxtype+2
EN,maxtype+2,maxnode+100                 !define a MASS71 element and connect it to the extra node of SURF152

FINISH
/SOLU                                    !enter the solution processor 
IC,maxnode+100,TEMP,45                   !specify an initial temperature of 45 C on the extra node

