|
[Sponsors] |
July 19, 2012, 14:23 |
Action at a distance source term
|
#1 |
New Member
Erica
Join Date: Jul 2012
Location: Mountain View, CA
Posts: 14
Rep Power: 14 |
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. |
|
Tags |
action at a distance, data access macro, source term |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem of SOURCE term gradient in UDS | wind | Fluent UDF and Scheme Programming | 6 | December 1, 2022 15:21 |
GPU Linear Solvers for OpenFOAM | gocarts | OpenFOAM Announcements from Other Sources | 37 | August 17, 2022 15:22 |
UDF source term | jerome_ | FLUENT | 2 | July 11, 2011 12: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 02:24 |