Topics relate to Fluent, CFX, Turbogrid and more

Loading Temperature/HeatFlux too slow

    • Federico Mazzoni


      I'm working with Transient Thermal module for a project about heat exchange simulation in a city. 

      My geometry consists on 4 "city blocks", a round area surrounding the city and a sky dome (see screenshot below). The meshing has roughly ~20k face elements.

      Our goal with this project is to load data (materials/convection/radiation/temperature) and run a simulation, expecting to have similar results to what we already have from another software (we already have result data about how the city is heated/cooled throughout the day, and we're basically moving that project to ansys)

      At this point we have modeled the materials/convection/conduction and got the results we somewhat expected. However we're facing a problem with how much data we can load into ansys in a reasonable time.

      Besides modeling convection/materials, we also need to load the following data from outside ansys (csv files basically):

      1) Sky dome temperatures.

           For every face element of the sky dome, we use historical data to determine a different temperature for different time steps throughout the day. So we have something like: at 00:00 this piece of the sky is, say, 15 ºC. temperature. For 00:30 some other piece of sky is, say, 20 ºC. We are using scripting to get some calculations done and load temperatures into the model. Our sky dome has 297 face elements, so we end up with 297 Temperature elements, each one of them with its own tabular data that determines the temperature of the sky face element for each 30 min step throughout the day. We have no problems up to this point

      2) Heat flux. 

          There are also heat fluxes that we need to load. We have one for every face element of the city. We also need tabular data in a time/value manner just like what we have for the sky dome and its temperatures, but in this case, for each and every face element of the city mesh. We would need somewhere around ~20k heat flux elements. Here is where we start facing performance issues. It just takes too long to load all of these Heat Fluxes, and it gets slower and slower and slower the more Heat Fluxes are already loaded to the model. We managed to load 4072 heat fluxes that correspond to the radiations that act on the roof of the city, which took about 8 hours, but it would take forever to load the remaining ~15k.
      The way our script works is: we read some csv files and generate a json object (using OrderedDict) that has the information of which (mesh element,face id) has which flux value. Generating this json takes about 5 seconds. We then iterate through this json keys, create Heat Flux objects (using heat_flux = analysis.AddHeatFlux()) and assign them the data that we have for each one. This is what seems to be the bottleneck. 

      To confirm that, I went back to the sky dome and ran the script that creates Temperature Objects and measured the time it took to run it each time, without deleting previously loaded data, this is what I got:

        -Create 150 Temperatures:  64 seconds

        -Create another 150 Temperatures: 73 seconds

        -Another 150 ... :89 seconds

        - ... :109 seconds

        - ... :126 seconds

        - ... :149 seconds

      So the question is, is there another way to load this data in the way we want, but reducing the time it takes to do so?
      Thanks in advance, and if you need me to describe something else or just give more insight on what we´re trying to acomplish, just ask!
      I leave you to the screenshots:
      Our city:
      The city surroundings, with bigger mesh elements (precision is less important the further away from the city we are)
      Sky dome, with 297 face elements:
      Example of temperature data for one element of the sky dome:
      The heat fluxes we managed to load so far:
      Example of one heat flux data:
      A frame of the simulation:
    • Rob
      Ansys Employee

      Just to confirm, you're using Mechanical? 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.