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

Source terms on multiple domains - best practice?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 31, 2017, 20:09
Cool Source terms on multiple domains - best practice?
  #1
New Member
 
Join Date: Dec 2016
Posts: 8
Rep Power: 10
bcade is on a distinguished road
Hello,

I have a simulation with three domains - one fluid and two solids that all share interfaces.

I need to apply a general source term to the entire simulation (energy deposition from high energy particles). I have the energy data in a large CSV (1.2 million rows) in X, Y, Z, watt/m^3 format (this covers all domains). I have imported this data as a User Function and am calling the user function within an expression. I am then creating a sub-domain in each of my domains, enabling an energy source, and selecting my expression. I've checked that the expression plots the correct power densities I expect.

My issue comes when I try to write a .def file, it seems to take an exorbitant amount of time. Is there a more computationally efficient method to implement the source terms I need?

Thanks!
bcade is offline   Reply With Quote

Old   April 1, 2017, 06:58
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Does the def file write quickly when you do not have the source term? How many nodes in you mesh?
ghorrocks is offline   Reply With Quote

Old   April 1, 2017, 15:31
Default
  #3
New Member
 
Join Date: Dec 2016
Posts: 8
Rep Power: 10
bcade is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Does the def file write quickly when you do not have the source term? How many nodes in you mesh?
Yes the def file writes quickly without the term, 800k nodes
bcade is offline   Reply With Quote

Old   April 1, 2017, 20:30
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,870
Rep Power: 144
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Puzzling. It might be creating a table for the source term and that would take some time with a large field like that. But I did not think it did that with user fortran stuff.

If you make a simple source term, maybe with only a few hundred values, does that run quickly?

Is the file size of the def file with the source term bigger than with no source term?
ghorrocks is offline   Reply With Quote

Old   October 19, 2017, 18:41
Default
  #5
New Member
 
Join Date: Dec 2016
Posts: 8
Rep Power: 10
bcade is on a distinguished road
An update to those googling with similar issues:

The source term array was simply much too large. I made multiple arrays with appropriate binning density in my particle tracking code, to cut down on the total number of data points while still having the necessary density where it counts. The .def file writes fine with less function data to interpolate.

Another option would be to do the interpolation in another program like Matlab and get an approximate function to use that way.
bcade is offline   Reply With Quote

Reply

Tags
cfx-pre, source energy term


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
GPU Linear Solvers for OpenFOAM gocarts OpenFOAM Announcements from Other Sources 37 August 17, 2022 15:22
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 04:04
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 16:46.