|
[Sponsors] |
how to define udf file for for source term, scattering, absorption coefficient. |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
uwumukunzi fidele
Join Date: Feb 2023
Posts: 1
Rep Power: 0 ![]() |
hello,
i am working on solar collector modeling, but I have failed to write udf file for user defined function for momentum source term, scattering, absorption coefficient. this is the error i am getting for cords of momentum source term (structure reference not implemented) cords: #include "udf.h" #include "math.h" #define H 2 #define To 300 #define kio 0.06 #define pi 3.14 DEFINE_SOURCE(ymom_source,cell,thread,ds,eqn) { real x[1]; double Fk; double beta=0.000222297; real T=C_T(cell,thread); double kim; kim=kio/(1+beta*(T-To)); Fk=(2*kim*pow(H,2)*(-kio*beta)/(1+beta*pow(T-To,2))*x[1].ds[T]*x[1]; return Fk; } |
|
![]() |
![]() |
![]() |
Tags |
fluent, fluent - udf, fluent - udf - parallel |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 14:30 |
[swak4Foam] Installation Problem with OF 6 version | Aurel | OpenFOAM Community Contributions | 14 | November 18, 2020 16:18 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 17:34 |
[foam-extend.org] problem when installing foam-extend-1.6 | Thomas pan | OpenFOAM Installation | 7 | September 9, 2015 21:53 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 06:42 |