|
[Sponsors] |
How to write a UDF for a heat source attached to a moving particle in Fluent? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 30, 2019, 07:46 |
How to write a UDF for a heat source attached to a moving particle in Fluent?
|
#1 |
New Member
Subham
Join Date: Sep 2018
Posts: 11
Rep Power: 7 |
The cross-section of the domain is similar to a pipe. The objective is to heat metal particles located at a certain distance from the inlet of the pipe using a specified value of heat flux. I don't know the resulting temperature so I cannot specify the temperature of the particle using DPM Source Macro as:
Code:
#include "udf.h" #include "dpm.h" DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p) { real xc[ND_ND]; // array of cell coordinates C_CENTROID(xc,c,t); // retrieves the cell coordinates if (xc[0] > 3) // only if this cell belongs in the domain where x > 3 m { P_T(p) = 500; //temperature of the metal particle increases to 500K } } |
|
October 1, 2019, 03:32 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
you can use source term as mass, momentum and energy exchange terms for coupled DPM calculations
I'm not sure about syntax but idea is: Code:
#include "udf.h" #include "dpm.h" DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p) { real xc[ND_ND]; // array of cell coordinates C_CENTROID(xc,c,t); // retrieves the cell coordinates if (xc[0] > 3) // only if this cell belongs in the domain where x > 3 m { S->energy = 500; //heat source 500W/m3 } } Code:
#include "udf.h" #include "dpm.h" DEFINE_DPM_SOURCE(dpm_source,c,t,S,strength,p) { real xc[ND_ND]; // array of cell coordinates real source = 0.0; C_CENTROID(xc,c,t); // retrieves the cell coordinates if (xc[0] > 3) // only if this cell belongs in the domain where x > 3 m { source = 500; //heat source 500W/m3 } return source; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam for OpenFOAM 4.0 | mnikku | OpenFOAM Community Contributions | 80 | May 17, 2022 08:06 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 09:07 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 17:34 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 09:17 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |