|
[Sponsors] | |||||
UDF to set the particle Z position to its initial Z position |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Larry
Join Date: Apr 2018
Posts: 2
Rep Power: 0 ![]() |
I need to fix the particle position in the Z direction to its initial value. The following is the UDF I tried:
#include "udf.h" #include "dpm.h" DEFINE_DPM_SCALAR_UPDATE(fix_particle_z, c, t, initialize, p) { if (initialize) { TP_USER_REAL(p, 0) = TP_POS(p)[2]; } else { TP_POS(p)[2] = TP_USER_REAL(p, 0); } } The UDF can be compiled without any problem and is called by Fluent, but it seems the particle Z position is not fixed at its initial value. Does anyone know what is wrong with the UDF? Thank you in advance! |
|
|
|
|
|
![]() |
| Tags |
| fix particle position, fluent, udf |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" | bigphil | OpenFOAM CC Toolkits for Fluid-Structure Interaction | 686 | December 22, 2022 10:10 |
| chtMultiRegionSimpleFoam: maximum number of iterations excedeed. | Nkl | OpenFOAM Running, Solving & CFD | 19 | October 10, 2019 03:42 |
| Floating point exception error | lpz_michele | OpenFOAM Running, Solving & CFD | 53 | October 19, 2015 03:50 |
| Unstabil Simulation with chtMultiRegionFoam | mbay101 | OpenFOAM Running, Solving & CFD | 13 | December 28, 2013 14:12 |
| pisoFoam with k-epsilon turb blows up - Some questions | Heroic | OpenFOAM Running, Solving & CFD | 26 | December 17, 2012 04:34 |