CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent Multiphase (https://www.cfd-online.com/Forums/fluent-multiphase/)
-   -   Viscous dissipation UDF for multiphase DDPM (https://www.cfd-online.com/Forums/fluent-multiphase/180803-viscous-dissipation-udf-multiphase-ddpm.html)

bhargavbharathan November 30, 2016 12:17

Viscous dissipation UDF for multiphase DDPM
 
3 Attachment(s)
Hi,

I have a query with hooking UDFs and I’m hoping to get it cleared with your assistance. My case is a long pipe with Eulerian Multiphase and DDPM.

1. Energy equation = ON.

2. Phase 1 = Non-newtonian laminar fluid with Herschel Bulkey formulation and temperature dependent properties. (Transient)

3. Phase 2 = Granular (frictional pressure is based-KTGF) with surface injection from inlet and Rosin-Rammler distribution. (Unsteady particle tracking)

4. My goal = To observe the temperature rise from inlet to outlet due to viscous dissipation during flow due to both primary and granular phases.

5. I have written three UDFs for this purpose. One each to obtain the viscous dissipation function (phi) from the velocities and velocity derivatives for each phase and stored them in two UDMs. I used DEFINE_EXECUTE_AT_END for this purpose.

6. My third UDF is a DEFINE_SOURCE UDF which adds the data from the two UDMs and inputs in the energy source term.

7. My problem: The two DEFINE_EXECUTE_AT_END UDFs are hooked at Define -> User - Define -> Function Hooks. The source UDF can only be hooked in Cell Zone Conditions if the Phase is set to Phase-1 and for both Mixture and Phase-2 the source term is frozen. I first converge my flow with the energy equation OFF in Solution Controls and no injection. I then switch ON the injection and run for a few time steps and finally switch ON my energy equation. This causes divergence in AMG solver : Pressure correction.

8. My query: Is it correct to hook the UDF in Phase-1? Is there another way the UDF needs to be hooked for the secondary phase? Is there anything else I’m missing.

*I ran two separate models prior to this for predicting erosion in Eulerian Multiphase and DDPM and without multiphase and just the non-Newtonian laminar model for predicting temperature rise due to viscous dissipation. Both of them work separately. Now my aim is to combine these two models and predict the effect of particle-particle interaction.

I have attached my UDFs below.

Attachment 52179

Attachment 52180

Attachment 52181

-BB


All times are GMT -4. The time now is 18:11.