|
[Sponsors] |
November 18, 2022, 17:08 |
structure reference not implemented line 20
|
#1 |
New Member
Join Date: Jun 2022
Posts: 27
Rep Power: 4 |
Hi guys, I am writing a udf to determine the temperature at wall by applying constant heat flux across the wall. There is flow across the channel, and the model is in 2d. And I trying to write it between the cell centroids. Since it's at the wall, which means only c0 is available. I am new to udf, so I am not sure how I could implement the code correctly. Any suggestion would be great! thank you!
#include "udf.h" #include "sg.h" DEFINE_PROFILE(wall_temperature,t,i) { real A[ND_ND]; real ds, q, k, A_by_es; face_t f; cell_t c0; Thread *t0; real es[ND_ND]; real dr0[ND_ND]; q=500; k=0.6; begin_f_loop(f,t) { c0 = F_C0(f,t); t0 = F_C0_THREAD(f,t); BOUNDARY_FACE_GEOMETRY(f,t,A,ds,es,A_by_es,dr0); F_PROFILE(f,t,i)=-q*k*ds + C_T(c0,t0); } end_f_loop(f,t) } |
|
November 21, 2022, 00:25 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
code is correct, however, your approach is not clear
__________________
best regards ****************************** press LIKE if this message was helpful |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues With Exporting From GMSH | rberdon | Mesh Generation & Pre-Processing | 0 | February 11, 2021 12:11 |
[Gmsh] 3D Mesh conversion from gmsh-2.5.0 to OpenFOAM | Ancioi | OpenFOAM Meshing & Mesh Conversion | 17 | January 9, 2019 00:50 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
OpenFOAM15 installables are incomplete problem with paraFoam | tryingof | OpenFOAM Bugs | 17 | December 7, 2008 05:41 |
Problems of Duns Codes! | Martin J | Main CFD Forum | 8 | August 15, 2003 00:19 |