|
[Sponsors] |
Need help with Compressible flow with DEFINE_SPECIFIC_HEAT |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Join Date: Feb 2011
Posts: 62
Rep Power: 15 ![]() |
Hi everyone,
I am simulating a compressible flow with the energy equation on. However I need to define the specific heat using a udf. I can get the cp values I want but I might also need a viable approximation for enthalpy in the same macro. For this aim, pressure and density seems necessary because cp=sigma(cpi)+pressure/density where cpi is the partial specific heat which I have no problem with. However I cannot use the pressure in the macro because as I have read on other topics posted in the forum, transfer of cell info into the macro seems impossible. Has anyone dealt with an issue of this sort? Is there a workaround? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Jan 2010
Location: Netherlands
Posts: 28
Rep Power: 16 ![]() |
just an idea..
you can turn off the energy equation and solve energy field using a user-defined scalar. any heat generation or viscous heating can be added as scalar sources. buoyancy effect can be added as source term to the momentum equation. heat flux or constant temperature at wall can be modelled using scalar profile. and so on... and finally your specific heat problem will be solved because the scalar diffusivity is defined on per-cell basis -- DEFINE_DIFFUSIVITY(name, c, t, i) -- scalar diffusivity of each cell is calculated separately, so you can use the cell pressure and density in the definition. a lot of work, i know. but it will solve the issue. |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 ![]() ![]() |
If I understand you correctly, you want to READ cell or face values to use them for calculations inside the UDF?
Thats easily feasible. For the cell Temperature for example, use C_T(c,t) Don't know the expressions for density or pressure by heart, but the UDF Manual surely does. |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Feb 2011
Posts: 62
Rep Power: 15 ![]() |
akm, I tried replacing temperature with a user defined scalar variable however unfortunately the results of a simplified run I did earlier did not match. Probably I could not define all the terms of UDS equation to mimic the energy equation. How do you suggest that I find all the required terms?
And would you suggest adding the rate of (pressure/density) as a source term for enthalpy? I would seriously use uds instead of temperature in order to define open boundary at the outlet. However I cannot be sure because I probably did some stuff wrong the first time. flotus1, I could not find a way to access the cell and thread indices through DEFINE_SPECIFIC_HEAT and return the specific heat value for the corresponding cell. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
Join Date: Jan 2010
Location: Netherlands
Posts: 28
Rep Power: 16 ![]() |
what kind of flow are you dealing with exactly ??
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,427
Rep Power: 49 ![]() ![]() |
Not sure what the manual says about the DEFINE_SPECIFIC_HEAT subroutine.
But you might be able to use DEFINE_PROPERTY(name,c,t) instead. Worked fine in one of my setups. |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Feb 2011
Posts: 62
Rep Power: 15 ![]() |
akm, I am modelling compressible flow at elevated temperatures with specific heat capacity values dependent on temperature in a tabulated manner.
flotus1, I am using fluent 12.1 and I cannot see the name of the DEFINE_PROPERTY macro name in the list when I want to specify specific heat. I can only access my udf using DEFINE_SPECIFIC_HEAT using this version of fluent. |
|
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compressible flow, no data at the outlet | mireis | FLUENT | 6 | September 3, 2015 03:10 |
Natural Convection using Compressible Flow (chtMultiRegionFOAM) | msarkar | OpenFOAM | 2 | September 7, 2010 01:13 |
help with compressible flow BC's (need subsonic flow) | meangreen | Main CFD Forum | 5 | July 24, 2010 14:16 |
Compressible Fluid Flow in COMSOL Multiphysics | BBG | COMSOL | 1 | November 19, 2008 15:05 |
Solving unsteady compressible low speed flow | atit | Main CFD Forum | 8 | July 31, 2000 14:19 |