|July 19, 2012, 13:23||
Action at a distance source term
Join Date: Jul 2012
Location: Mountain View, CA
Posts: 14Rep Power: 4
Hi! I am trying to write a DEFINE_SOURCE macro that calculates a source for one cell based on the current (or previous time step) value of variables in other cells (not just the cell's neighbors.) An example of this is a fluid with a charge distribution where the fluid in one cell is electrostatically forced by the charge in other cells.
The problem is I don't know how to access the data in other cells within the DEFINE_SOURCE function. I tried a begin_c_loop ... end_c_loop structure, initializing a different cell pointer and a different thread (also tried using the same thread) but that didn't work. Any ideas?
Thanks in advance for your help.
|action at a distance, data access macro, source term|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Problem of SOURCE term gradient in UDS||wind||Fluent UDF and Scheme Programming||5||June 21, 2013 05:39|
|GPU Linear Solvers for OpenFOAM||gocarts||OpenFOAM Announcements from Other Sources||35||March 1, 2012 21:41|
|UDF source term||jerome_||FLUENT||2||July 11, 2011 11:55|
|How to write source term into scalar Fiel||JimKnopf||OpenFOAM Programming & Development||0||March 23, 2011 06:59|
|DxFoam reader update||hjasak||OpenFOAM Post-Processing||69||April 24, 2008 01:24|