Thank you, Yvan,
I tried to use an array rcodcl(ifac, ivar, 1) for import boundary wall temperature (

,

) input in GUI into calculation of thermal expansion coefficient

in subroutine usphyv. However, the attempt was unsuccessful, since usphyv is called before input boundary wall temperature into rcodcl(ifac, ivar, 1).
Finally, I defined boundary wall temperature as local variables in usphyv, and calculated thermal expansion coefficient as below.
Code: Select all
g_mag_z = sqrt(gx * gx + gy * gy + gz * gz)
leng_z = 1.d0
ra_z = 1.d+6
tc_z = 293.15d0
th_z = 303.15d0
dtemp_z = th_z - tc_z
rho_c_z = 1.2039d0
t_diff_z= 2.59d-2
visc_z = 1.83d-5
cp_z = 1004.84d0
do iel = 1, ncel
xrtp = rtp(iel,ivart)
rho_z = propce(iel,ipproc(irom))
beta_z = ra_z * t_diff_z * visc_z / (rho_z * rho_z * cp_z * g_mag_z * dtemp_z * leng_z * leng_z * leng_z)
propce(iel,ipcrom) = rho_c_z * (1.d0 - beta_z * (xrtp - tc_z))
enddo
I could get almost same calculation results as tutorial.
Best regards,
Junichi