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

Non-equilibrium conditions in porous media

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2024, 03:01
Post Non-equilibrium conditions in porous media
  #1
New Member
 
Girish
Join Date: Jun 2024
Posts: 2
Rep Power: 0
P_Anu9 is on a distinguished road
I am trying to solve porous media non-equilibrium condition using two energy model in FLUENT. For that i need the values of both solid and fluid from previous time step but when I searched in udf manual there is no mention of using two temperatures together in a code.
It just creates two different solid and fluid zone and solves separately for each zone.
How can i access temperature of solid zone from previous time step for calculation in current time step in fluid zone and vice-versa?

The coupling term in both the solid and fluid energy equation is :
G(Ts-Tf) for fluid and G(Tf-Ts ) for solid. which needs to be given through source term but i am only able to give only single temperature as C_T(c,t) and other as constant. how can i give both as variable(or at least feed value from other zone and previous time step)?
Can anyone help?
P_Anu9 is offline   Reply With Quote

Old   July 9, 2024, 06:20
Default
  #2
Senior Member
 
Martin_Sz's Avatar
 
Marcin
Join Date: May 2014
Location: Poland, Swiebodzin
Posts: 313
Rep Power: 13
Martin_Sz is on a distinguished road
You're right, the FLUENT UDF manual might not explicitly mention using two temperatures together in a single User Defined Function (UDF). However, there are ways to achieve the non-equilibrium heat transfer with a two-energy model using UDFs. Here's how you can approach it:

**1. Define UDFs for Source Terms:**

Create separate UDFs for the source terms in both the solid and fluid energy equations. In these UDFs, you can access the following information:

* **Cell-centered Variables:** You can use `C_CENTROID(c,t)` to get the current time step values for various variables at the cell centroid, including fluid temperature (`C_T(c,t)`) and other relevant properties.
* **Custom User Defined Memory (C_UDM):** This allows you to store and access data from previous time steps. You can define separate UDFMs for solid and fluid temperatures from the previous time step (e.g., `C_UDM(c,T_SOLID_PREV)` and `C_UDM(c,T_FLUID_PREV)`) and update them within the UDFs.

**2. Calculation Steps within UDFs:**

Within your UDFs, follow these steps:

* **Calculate Coupling Term:** Calculate the heat transfer term `G(Ts-Tf)` for the fluid source term and `G(Tf-Ts)` for the solid source term. You can access the current fluid temperature `C_T(c,t)` and store the previously saved solid temperature from UDM (`C_UDM(c,T_SOLID_PREV)`) for the fluid source term calculation. Similarly, use the current solid temperature from UDM (`C_UDM(c,T_FLUID_PREV)`) for the fluid temperature in the solid source term calculation.
* **Update UDM:** After calculating the source term, update the UDM for the current time step's solid and fluid temperatures:
* `C_UDM(c,T_SOLID_CURRENT) = C_T(c,t)` (for fluid UDF)
* `C_UDM(c,T_FLUID_CURRENT) = C_T(c,t)` (for solid UDF)

**3. Linking UDFs in FLUENT:**

In FLUENT, define source terms in the energy equations for both solid and fluid phases. Link the corresponding UDFs you created (one for the fluid source term and another for the solid source term) to these source terms.

**4. Initialization:**

For the first time step, you might need to provide initial values for the UDM of both solid and fluid temperatures. You can set them to the initial temperature condition or any other appropriate value.

**Additional Notes:**

* Make sure your UDFs are compiled correctly and loaded into FLUENT.
* Double-check the UDF syntax and logic to ensure proper calculation and update of the UDM variables.
* Consider using DEFINE_PROFILE for defining the heat transfer coefficient `G` if it's a function of other variables.

By implementing these steps, you should be able to access and utilize both solid and fluid temperatures from the previous time step within your UDFs for calculating the source terms in the two-energy model for non-equilibrium heat transfer in porous media.
__________________
Quick Tips and Tricks, Tutorials FLuent/ CFX (CFD)
https://howtooansys.blogspot.com/
Martin_Sz is offline   Reply With Quote

Reply

Tags
non-equilibrium model, porous media model, udf code


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
Porous Media Zone Thickness TheKitchenCleaner FLUENT 0 October 5, 2020 01:42
Porous media setup issues in Fluent Bernard Van FLUENT 29 January 26, 2017 05:09
Porous Media Local Thermal Non Equilibrium Model typhoon1010 FLUENT 2 September 1, 2016 15:03
species mass source in porous media ? PK FLUENT 0 February 16, 2007 12:12
Testing the integrity of POROUS media and por jump Azman FLUENT 0 July 31, 2006 12:11


All times are GMT -4. The time now is 10:56.