Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

10 year HX model

    • RAJEH
      Subscriber
      Dear teguhhady
      I am trying to do 10 years transient simulations for a ground heat exchanger. Would you please guide me through the steps that you used to do this simulation (time step size, number of time steps, ..). I will be very thankful if you can help me.
    • Amine Ben Hadj Ali
      Ansys Employee
      probably better to open a new thread.
    • RAJEH
      Subscriber
      dear DrAmine
      sorry I didn't understand what you mean by a new thread. I am new to this type of simulation. Would you simplify your suggestion?
    • System
      Subscriber
      This discussion was created from comments split from: Asking long term simulation (10 years) for heat conduction in ground?.
    • Rob
      Forum Moderator
      It's customary to start a clean thread to ask a new question. This avoids confusion or hijacking of the original. I've split your posts out.
      I'd start by doing the tutorials and go from there. 10 years a long time to model: what are you trying to find out?
    • Amine Ben Hadj Ali
      Ansys Employee
      A combination of NITA and "moderate" to "large" time step size can be useful and if you have only Fluid zones or Fluid + solid Zones. If only Solid zones there are some more better approaches.
    • RAJEH
      Subscriber
      I want to study the dynamic heat transfer of ground heat exchanger during 10 years taking to account the load fluctuation between heating in winter, cooling in summer, and without load for the rest of the year.
      Now I need to write two UDF codes, for the mass flow rate and the inlet temperature ( coming from the load entering to the heat exchanger), so do you have any suggestions for me that can help me to write these codes. If you have passed through any codes that carry out these types of work please share them with me, I will be very thankful. I am a beginner in this type of analysis).
    • Amine Ben Hadj Ali
      Ansys Employee
      We do not have any codes which we can pass but we refer to the Fluent Customization Manual. If you know the "laws" behind the mass flow rate and inlet temperature you want to specify we can help here providing some suggestions how to achieve that per UDF or Expression but we won't write that for you.
    • RAJEH
      Subscriber
      Thank you for your replay, I will start writing the code, I will do my best and I will ask you if I face a specified problem in my code.
    • 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.

    • Rob
      Forum Moderator
      The coding looks about right, but for REALs use 0. and 3600. to avoid any syntax confusion with INTEGERs. It may not matter with modern software, but I (and a few colleagues) was taught FORTRAN77 and some habits stuck.
      Given the time scale I suspect you're not resolving the flow field - the time step needs to be low enough to pick up the flow (roughly cell size/velocity / 10). If you run 4-5 steady simulations at the conditions above how does it tie up with the expected chart? Note, staff aren't permitted to open attachments.
    • RAJEH
      Subscriber
      Dear Rob thank you for your reply.
      I simplified the problem for one day period simulations and I wrote better codes, every six hours the mass flow rate and temperature are changing as follows:
      Period 1 : the first-6 hours T= 6 C, m= 0.583 Kg/s Period 2 :the second 6 hours = no inlet temperature, so m=0 Period 3 :the third-6 hours T= 30 C, m=0.583 kg/s,
      Period 4 : the fourth 6 hours no inlet temperature so m=0
      I have only one problem with the code now (the results now are fine except for this problem).
      If I set the mass flow rate as zero (m=0) the solution is not converging and the results are not reliable in the second and fourth periods.
      If I donÔÇÖt set values for the inlet temperature and mass flow rate, the temperature is set by fluent automatically as the previous period temperature and mass flow rate.
      So my question is: how can I set the inlet boundary conditions (temperature and mass flow rates if I don't want fluid flow through the domain during the second and fourth periods)?
      In case you have any suggestions for me to solve this problem please let me know.


      /********UDF for giving the mass flow rate to the outerfluid and innerfluid **********/
      DEFINE_PROFILE(give_m,t,index)
      {
      begin_f_loop(f,t)
      {
      if(CURRENT_TIME <= 21600 )
      {
      F_PROFILE(f,t,index)= 0.58333;
      }
      else if(CURRENT_TIME > 43200 && CURRENT_TIME <= 64800)
      {
      F_PROFILE(f,t,index)= 0.58333;
      }
      }
      end_f_loop(f,t)
      }
      /***********UDF for giving the temperature to the top outerfluid************/
      DEFINE_PROFILE(give_T_top_outerfluid,t,index)
      {
      begin_f_loop(f,t)
      {
      if(CURRENT_TIME <= 21600 )
      {
      F_PROFILE(f,t,index)= 30+273.15;
      }
      else if(CURRENT_TIME > 43200 && CURRENT_TIME <= 64800)
      {
      F_PROFILE(f,t,index)= 6+273.15;
      }
      }
      end_f_loop(f,t)
      }

    • Rob
      Forum Moderator
      Mass flow boundaries should only be used with non-constant density. If it's constant use a velocity bc, that may be more stable. As the flow is zero the solver may struggle with convergence but use monitors to check if this is a numerical or real problem: for a very low flow (zero) the error may be relatively big (zero against near-enough zero) and that can throw the maths.
    • Amine Ben Hadj Ali
      Ansys Employee
      Just for info: If you are using a newer version you better stick to Expression instead of Coding. Moreover your profile seem very simple: why not using transient tables or profiles (as alternative)
    • RAJEH
      Subscriber
      Dear Rob, and DrAmine
      I have tried inlet velocity, but I still have the same problem.
      I am using ANSYS 19.0
      Would you please tell me in more detail what you mean by using transient tables or profiles (as an alternative)?

      In my simulation, I am trying to study the heat transfer behavior of the soil around the ground heat exchanger along the transient time of the year (SUMMER_ AUTUMN_WINTER_SPRING). So,
      1- in summer the fluid flows through the heat exchanger at constant temperature (30 C).
      2- In Autumn there is no fluid flowing through the heat exchanger, but the soil temperature is dissipated and affected by the time period of this season, the
      3- In Winter the fluid flows through the heat exchanger at constant temperature (6 C), so the soil will have new heat dissipated rate ( heat transfer behavior), then
      4- In Spring there is no fluid flowing through the heat exchanger, but the soil temperature is dissipated and affected by the time period of this season.
      SO if you have any suggestions for me to approach this problem please let me konw.
      I am using ANSYS 19.0
      For the coding, I am using the C language.


    • Rob
      Forum Moderator
      Transient profiles are covered in the User's Guide, and allow "value" to be set with time.
      Note, in Fluent we solve the flow time step. This is typically measured in seconds and fractions of seconds. In this case you're trying to solve hours for different times of the year. For spring & autumn as there is no flow and heat transfer is a function of the weather I don't see a use for CFD. For summer & winter the flow part contains energy (temperature) and gives a heat transfer rate from the liquid to the pipe wall. The flow and pipe side heat transfer coefficient are arguably constant, so again it's a conduction problem in the solid. You may be better off using Mechanical for this as it'll be quicker.
    • RAJEH
      Subscriber
      Dear Rob
      Thank you very much for your valuable information. I will study my problem in more detail and I will consider your suggestions.
    • RAJEH
      Subscriber
      Dear Rob
      Can I import a meshed geometry from GAMBIT into workbench transient thermal analysis?
    • RAJEH
      Subscriber

      I think this is the way to import meshed geometry from GAMBIT into workbench transient thermal analysis, but when I update the mesh in transient thermal analysis I get this message.
    • Rob
      Forum Moderator
      You can read the mesh directly into Fluent, I'm not sure if Mechanical will read a mesh file like that. Note, GAMBIT .dbs files will read into older versions of SpaceClaim (R15-R18 I think) but boundary label and mesh data isn't retained.
Viewing 19 reply threads
  • The topic ‘10 year HX model’ is closed to new replies.