Question about the third tutorial Heated-square-cavity-flow
Posted: Tue Apr 18, 2017 9:30 am
Hello everyone,
In fact, I am a new user, and I don't have any ideas about Fortran, so when I followed the tutorial, I can't understand the sample file 'cs_user_physical_properties.f90' at all, so could you please give me a correct sample file 'cs_user_physical_properties.f90' about the second tutorial, and could you please tell me that where I can find the definition of all the properties, like pressure, density...
Can I amend the 'Example 1' with the equation ρ=ρc*(1-β*(T-Tc)) and β=k*μ*Ra/(ρ^2*Cp*g*(Th-Tc)*L^3) like this:
And one more question please, I have also complied the equation in Mathematical expression editor:
Does it have any difference with user coding?
Thank you for everything
Kind regards
XING Jian
In fact, I am a new user, and I don't have any ideas about Fortran, so when I followed the tutorial, I can't understand the sample file 'cs_user_physical_properties.f90' at all, so could you please give me a correct sample file 'cs_user_physical_properties.f90' about the second tutorial, and could you please tell me that where I can find the definition of all the properties, like pressure, density...
Can I amend the 'Example 1' with the equation ρ=ρc*(1-β*(T-Tc)) and β=k*μ*Ra/(ρ^2*Cp*g*(Th-Tc)*L^3) like this:
Code: Select all
call field_get_val_s(iprpfl(ibeta), cpro_beta)
do iel = 1, ncel
xvart = cvar_scalt(iel)
cpro_beta(iel)= (0.0258d0*0.0000183d0*1000000d0)/1.2039d0*1.2039d0*1004.84d0*9.81d0*10d0*1d0)
cpro_rom(iel) = 1.2039d0 * (1.d0-cpro_beta(iel)*(xvart-293.15d0))
enddo
Code: Select all
conductivity=0.0259;
viscosity=1.83e-05;
Ra=10^6;
Cp=1004.84;
g=-9.81;
Th=303.15;
Tc=293.15;
L=1;
beta=conductivity*viscosity*Ra/(rho0^2*Cp*g*(Th-Tc)*L^3);
density = 1.293*(1-beta*(temperature-Tc));
Thank you for everything
Kind regards
XING Jian