|
[Sponsors] |
May 12, 2017, 11:21 |
Access to the cells values on the boundary
|
#1 |
New Member
buidu
Join Date: Dec 2014
Posts: 27
Rep Power: 13 |
Dear all,
I plan to make a user code for heat source. The heat generation rate is relevant to the surface mass flux. Does anyone know how should I make the user coding to access the cell value for mass flux. I asked the star ccm support. However, they normally do not support for user coding... Thank you very much for your kind help. regards, Buidu |
|
February 1, 2019, 13:42 |
|
#2 |
Member
Yogesh Nalam
Join Date: Sep 2012
Location: München, Germany
Posts: 54
Rep Power: 14 |
Hello,
It could look something like this : void USERFUNCTION_EXPORT massflux(CoordReal *result, int size, CoordReal *MassFlux) { int i; for (i =0 ; i< size ; ++i) { result[i] = .... ... ... ... } #include "uclib.h" void massflux(CoordReal*, int, CoordReal*); void USERFUNCTION_EXPORT uclib() { ucfunc(massflux, "ScalarFieldFunction", "MF"); ucarg(massflux, "Face", "$MassFlux", sizeof(CoordReal)); } |
|
Tags |
field fucntion, user code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
Error - Solar absorber - Solar Thermal Radiation | MichaelK | CFX | 12 | September 1, 2016 06:15 |
Numerical errors in nested domain with pre-calculated boundary values | Arnoldinho | OpenFOAM Running, Solving & CFD | 3 | April 4, 2012 11:31 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |