Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.

Ansys Learning Forum Forums Discuss Simulation Fluids 10 year HX model Reply To: 10 year HX model

RAJEH
Subscriber
I am trying to simplify the problem here. These are codes for dynamic boundary conditions. The first hour (Temperature = 30, and mass flow rate= 0.583) the second hour (Temperature = 30, and mass flow rate= 0), the third hour (Temperature = 6, and mass flow rate= 0.583), the fourth hour (Temperature = 30, and mass flow rate= 0). I am not getting the results that I expected. Do you have any suggestions for me to correct or use another approach to write my codes?

DEFINE_PROFILE(give_T_top_outerfluid,t,index)

{
real time=RP_Get_Real("flow-time");
real total_time = 0;
begin_f_loop(f,t)

{
total_time = total_time + ceil(time);
if(total_time <= 3600 )
{
F_PROFILE(f,t,index)= 30 +273.15;
}
else if(total_time > 3600 && total_time <= 7200)
{
F_PROFILE(f,t,index)= 30 +273.15;
}
else if(total_time > 7200 && total_time <= 10800)
{
F_PROFILE(f,t,index)= 6 +273.15;
}
else
{
F_PROFILE(f,t,index)= 6 +273.15;
}
}
end_f_loop(f,t)
}


DEFINE_PROFILE(give_mass_flow_rate,t,index)

{
real time=RP_Get_Real("flow-time");
real total_time = 0;
begin_f_loop(f,t)

{
total_time = total_time + ceil(time);
if(total_time <= 3600 )
{
F_PROFILE(f,t,index)= 0.583;
}
else if(total_time > 3600 && total_time <= 7200)
{
F_PROFILE(f,t,index)= 0;
}
else if(total_time > 7200 && total_time <= 10800)
{
F_PROFILE(f,t,index)= 0.583;
}
else
{
F_PROFILE(f,t,index)= 0;
}
}
end_f_loop(f,t)
}
Attached are graphs of the physical goal of writing the codes.

[bingo_chatbox]