CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Volumetric heat source from dense point cloud

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2018, 05:14
Default Volumetric heat source from dense point cloud
  #1
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
Hi All,

(I apologize in advance if what I'm about to ask has already been addressed in other threads: I've actually made a search over the forum, but I may have missed something relevant.)

I'm setting up a CFX CHT simulation. The problem involves a volumetric power source non-uniformly distributed over the solid domain. Information is to be loaded into a 3D interpolating user function from a rather dense 3D point cloud (namely a csv file with [X, Y, Z, Power] fields and around 1M entries).
1st issue: with such a large number of points, once the user function has been created CFX-Pre gets stuck when writing out a def file.
2nd issue: even with far smaller numbers of points (e.g. 10k), the interpolation operations (being them performed at every time-step) heavily impact on the computing time, thus making the simulation very inefficient.
My question: is there an alternate way to efficiently exploit the point cloud to set a volumetric source? Perhaps via FORTRAN?
Sub-question: would having a point cloud already mapped onto the domain's nodes be of some help?

Thanks a lot for any possible hints.

Fabio
fabio moretti is offline   Reply With Quote

Old   February 16, 2018, 02:43
Default
  #2
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,835
Rep Power: 27
Gert-Jan will become famous soon enough
For a case where I needed UV light intensity, I defined a User Function called Intensity. In this User Function I read 130.000 points (x,y,z,I) from a .csv-file without problems. Then I defined an additional variable as an algebraic equation with value Intensity(x,y,z), which gave me a beautiful intensity in 3D. I used this intensity to determine the dose that Particles collected on their way through the 3D field. I think this resembles your case, but I hardly noticed any effect on computer performance.

1) Did you do exactly the same?
2) Can you describe the power distribution with CEL-Functions? Or is it far too complex?
3) Certainly it depends on the resource you have. Is your computer really slow?

When I read in 130.000 points, I get a Warning. It says that to improve performance, it is recommended to modify the data such, that it can be imported as a Profile Data file. I ignored this warning and CFX continues without problems. Possibly you hit a limit. Did you consider this option?

Last edited by Gert-Jan; February 16, 2018 at 04:44.
Gert-Jan is offline   Reply With Quote

Old   February 19, 2018, 05:15
Default
  #3
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
Thanks Gert-Jan for your focused feedback.

Here are my answers:

1)
No, I didn't define any additional variable. I defined a User Function "power(x,y,z)" from a .csv (the point cloud), then I defined an Expression as "fpower = power(x,y,z)", then I set a volumetric power source as "fpower" over a subdomain.
After your comment, I also tried using an additional variable defined by an algebraic equation (i.e. = "power"), but I got no improvement.

2)
I cannot exclude that, as I haven't done yet a careful analysis of that distribution. But I expect that it would hardly be expressed by simple CEL functions. Moreover, it would be preferable to set up a generally applicable procedure.

3)
I'm using a rather powerful machine.

As I wrote before ("2nd issue"), I am experiencing degraded performance already with 10'000 points.
However, I forgot to say that the tests I run involved a solid domain only (just heat conduction). Of course the relative impact of interpolation on a CHT run (heat conduction + NS + turbulence...) performance would be less severe. I am going to make further tests about that.
fabio moretti is offline   Reply With Quote

Old   February 19, 2018, 05:38
Default
  #4
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,835
Rep Power: 27
Gert-Jan will become famous soon enough
Hi Fabio,

I alse wrote:

"When I read in 130.000 points, I get a Warning. It says that to improve performance, it is recommended to modify the data such, that it can be imported as a Profile Data file. I ignored this warning and CFX continues without problems. Possibly you hit a limit. Did you consider this option?"

Did you also get this message/warning? Will you consider this "Profile Data file" approach?

Regs, Gert-Jan
Gert-Jan is offline   Reply With Quote

Old   February 19, 2018, 05:54
Default
  #5
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
Sorry, I should have answered on that point too. I was in a hurry...

Well yes, I got that message too. Initially I had dropped that option because I thought it applies only when dealing with boundaries. But I was wrong: I've just found out that one may also do the "Initialize profile data" thing also for a 3D data set and use it to define a volumetric source. The data will not be loaded in CFX-Pre and then stored in the .def, rather the .def will include just a link to the .csv, and the data will be loaded by the Solver when the run is launched. So, there's an advantage in terms of .def file handling. However, you don't gain anything in terms of computing performance, because the interpolation keeps being performed at each time step.

Another way to work around the problem with file.def saving (in case all the cloud is stored there), is to "manually" edit a CCL file and then update the .def by the command cfx5cmds.

Thanks again, Gert-Jan, for your help.

Last edited by fabio moretti; February 19, 2018 at 08:07.
fabio moretti is offline   Reply With Quote

Old   May 9, 2019, 11:04
Default
  #6
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
Hi everyone.



After over one year spent doing other stuff, now I've just got back to that unresolved issue.


I have a 15 M nodes CFD CHT model (roughly half in the solid domain), and a 1M points cloud, representing a constant volumetric power source to be mapped onto the solid domain.
Every iteration (outer loop or coefficient loop) lasts a few minutes on the best machine available to me (say 10 cores on a good Xeon workstation), while waiting for HPC resources to become available.



I run some tests, which showed that:


- with the pseudo-steady-state solver, the interpolation function is called at every iteration; compared to a test with algebraic source (no interp), the increase in computing time is as large as 40%;



- with the trantient solver, the interpolation is performed at the beginning of every time step, and still has a considerable impact.



I still believe that it would be nice if I were allowed to have the interpolation done only once, at the beginning of both a steady-state simulation and a transient one (to represent a source, of a BC, that is constant over time).
But I do not know if there is a way to work it out.


So, any hints would be much appreciated! Thanks in advance.
fabio moretti is offline   Reply With Quote

Old   May 9, 2019, 18:12
Default
  #7
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,718
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
I think your first post was heading in the right direction - if the built in interpolation functions are not working for you then write your own using User Fortran.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.
ghorrocks is offline   Reply With Quote

Old   May 10, 2019, 04:10
Default
  #8
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
...which I would have already tried to do if I were familiar enough with user Fortran, and if those who provide ANSYS technical assistance in Italy hadn't discouraged me (they said it wouldn't help - I am not quite convinced though).


If the project time and budget limitations allow me, then I will try to go that way.


Thanks for you reply.
fabio moretti is offline   Reply With Quote

Old   May 10, 2019, 04:14
Default
  #9
Senior Member
 
Gert-Jan
Join Date: Oct 2012
Location: Europe
Posts: 1,835
Rep Power: 27
Gert-Jan will become famous soon enough
When using 3D point cloud, I sometimes noticed a huge difference in calculation time between a case starting from scratch (fast) and a continued calculation (deadly slow). Don't know why, but maybe you observed the same behaviour?
Gert-Jan is offline   Reply With Quote

Old   May 10, 2019, 04:46
Default
  #10
New Member
 
fabio moretti
Join Date: Jan 2011
Location: Pisa
Posts: 10
Rep Power: 15
fabio moretti is on a distinguished road
As you point that out, I realize that I might have observed that too. Not sure, though. I'll check if possible and let you know. Thanks.
fabio moretti is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error - Solar absorber - Solar Thermal Radiation MichaelK CFX 12 September 1, 2016 05:15
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Community Contributions 14 April 23, 2013 13:59
[blockMesh] error EOF in blockMesh Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 7 May 17, 2012 00:37
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 04:32.