


{"id":286113,"date":"2023-05-27T16:14:07","date_gmt":"2023-05-27T16:14:07","guid":{"rendered":"\/forum\/forums\/topic\/loading-heatflux-temperature-too-slow\/"},"modified":"2023-05-27T16:19:31","modified_gmt":"2023-05-27T16:19:31","slug":"loading-heatflux-temperature-too-slow","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/loading-heatflux-temperature-too-slow\/","title":{"rendered":"Loading Heatflux\/Temperature too slow"},"content":{"rendered":"<p>Hi!<\/p>\n<p>I&#8217;m working with Transient Thermal module for a project about heat exchange simulation in a city.&nbsp;<\/p>\n<p>My geometry consists on 4 &#8220;city blocks&#8221;, a round area surrounding the city and a sky dome (see screenshot below). The meshing has roughly ~20k face elements.<\/p>\n<p>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&#8217;re basically moving that project to ansys)<\/p>\n<p>At this point we have modeled the materials\/convection\/conduction and got the results we somewhat expected. However we&#8217;re facing a problem with how much data we can load into ansys in a reasonable time.<\/p>\n<p>Besides modeling convection\/materials, we also need to load the following data from outside ansys (csv files basically):<\/p>\n<p>1) Sky dome temperatures.<\/p>\n<p>&nbsp; &nbsp; &nbsp;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 &ordm;C. temperature. For 00:30 some other piece of sky is, say, 20 &ordm;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<\/p>\n<p>2) Heat flux.&nbsp;<\/p>\n<p>&nbsp; &nbsp; 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.<br \/>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 <span style=\"font-size: 14pt\">heat_flux = analysis.AddHeatFlux()) and assign them the data that we have for each one. This is what seems to be the bottleneck.&nbsp;<\/span><\/p>\n<p><span style=\"font-size: 14pt\">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:<\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; -Create 150 Temperatures:&nbsp; 64 seconds <\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; -Create another 150 Temperatures: 73 seconds<\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; -Another 150 &#8230; :89 seconds<\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; &#8211; &#8230; :109 seconds <\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; &#8211; &#8230; :126 seconds<\/span><\/p>\n<p><span style=\"font-size: 14pt\">&nbsp; &#8211; &#8230; :149 seconds<\/span><\/p>\n<div>\n<div>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?<\/div>\n<div>Thanks in advance, and if you need me to describe something else or just give more insight on what we&acute;re trying to acomplish, just ask!<\/div>\n<div>&nbsp;<\/div>\n<div>I leave you to the screenshots:<\/div>\n<div>&nbsp;<\/div>\n<div>Our city:<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203533-mceclip0.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203533-mceclip0.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>The city surroundings, with bigger mesh elements (precision is less important the further away from the city we are)<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203603-mceclip1.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203603-mceclip1.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>Sky dome, with 297 face elements:<\/div>\n<div>&nbsp;<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203642-mceclip2.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203642-mceclip2.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>Example of temperature data for one element of the sky dome:<\/div>\n<div>&nbsp;<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203743-mceclip3.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203743-mceclip3.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>The heat fluxes we managed to load so far:<\/div>\n<div>&nbsp;<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203932-mceclip5.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203932-mceclip5.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>Example of one heat flux data:<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203974-mceclip6.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685203974-mceclip6.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<div>A frame of the simulation:<\/div>\n<div>&nbsp;<\/div>\n<div><a class=\"wp-colorbox-image cboxElement\" href=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685204043-mceclip7.png\"><img decoding=\"async\" src=\"\/forum\/wp-content\/uploads\/sites\/2\/2023\/05\/27-05-2023-1685204043-mceclip7.png\"><\/a><\/div>\n<div>&nbsp;<\/div>\n<\/div>\n","protected":false},"template":"","class_list":["post-286113","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["285966","170445"],"_bbp_author_ip":["168.143.243.24"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["739","739"],"_edit_lock":["1685662504:219410"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["286113"],"_bbp_forum_id":["27791"],"_bbp_engagement":["170445","285966"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["287276"],"_bbp_last_active_id":["287276"],"_bbp_last_active_time":["2023-06-06 02:40:14"]},"test":"luciano-federico-mazzonifing-edu-uy"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/286113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/286113\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=286113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}