CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

how to define udf file for for source term, scattering, absorption coefficient.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2023, 04:47
Default how to define udf file for for source term, scattering, absorption coefficient.
  #1
New Member
 
uwumukunzi fidele
Join Date: Feb 2023
Posts: 1
Rep Power: 0
hamzafidele is on a distinguished road
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;
}
hamzafidele is offline   Reply With Quote

Reply

Tags
fluent, fluent - udf, fluent - udf - parallel


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -4. The time now is 14:55.