TAGGED: #python-#ironpython, ansys-running-slow, heatflux, temperature
-
-
June 1, 2023 at 11:38 pmFederico MazzoniSubscriber
Hi!
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: -
June 5, 2023 at 10:50 amRobForum Moderator
Just to confirm, you're using Mechanical?Â
-
- The topic ‘Loading Temperature/HeatFlux too slow’ is closed to new replies.
- How do I get my hands on Ansys Rocky DEM
- Non-Intersected faces found for matching interface periodic-walls
- Unburnt Hydrocarbons contour in ANSYS FORTE for sector mesh
- Fluent fails with Intel MPI protocol on 2 nodes
- Help: About the expression of turbulent viscosity in Realizable k-e model
- Cyclone (Stairmand) simulation using RSM
- Mass Conservation Issue in Methane Pyrolysis Shock Tube Simulation
- Script Error
- Facing trouble regarding setting up boundary conditions for SOEC Modeling
- convergence issue for transonic flow
-
1507
-
599
-
597
-
591
-
366
© 2025 Copyright ANSYS, Inc. All rights reserved.