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

Source term in energy equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 7, 2006, 08:50
Default Source term in energy equation
  #1
macdidi
Guest
 
Posts: n/a
Hello I'm modelling heat transfer between fluid domain and solid. I've to add a souce term in energy equation of solid, This term depend on temperature, time and other variable. I do it using fortran subroutine. But I've this error message in Pre:

The variable 'T' referenced in parameter 'Source' in object '/FLOW/DOMAIN:Product/SUBDOMAIN:Subdomain 1/SOURCES/EQUATION SOURCE:energy' does not have one of the required prefixes: phase or particle.

PS: I define my solid as CHT
  Reply With Quote

Old   June 7, 2006, 09:00
Default Re: Source term in energy equation
  #2
opaque
Guest
 
Posts: n/a
Dear macdidi,

The preprocessor is being "picky" that it should.. Just add the prefix to the variable T.. For example, if your solid list includes Copper, just pass the Copper.T variable to your User Fortran.

If that works, please let everyone here knows.

Good luck,

Opaque..

  Reply With Quote

Old   June 7, 2006, 09:02
Default Re: Source term in energy equation
  #3
Joe
Guest
 
Posts: n/a
You need to disambiguate which phase the T refers too. I cant remember the exact syntax offhand but its something equivalent to: phase1.T rather than just T.
  Reply With Quote

Old   June 7, 2006, 10:58
Default Re: Source term in energy equation
  #4
macdidi
Guest
 
Posts: n/a
Thanks I try youre sugestion and now it's working Thanks a lot
  Reply With Quote

Old   April 15, 2017, 06:33
Default
  #5
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
hi could tell me what is the expression of term source in the equation of energy please ? i am modeling temperature in fortran too but i can't find the right form of term source
mariema is offline   Reply With Quote

Old   April 15, 2017, 18:53
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Digging up an 11 year old thread.... You are lucky some of us old timers are still around.

If you want to set a source term from fortran then use your fortran to set a CEL variable and set the source term to that variable in CFX-Pre.
ghorrocks is offline   Reply With Quote

Old   April 17, 2017, 18:13
Default
  #7
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
thanks for replying Ghorroks.. Actually i don't use CFX-Pre. is there any way to write that subroutine in Fortran without using CFX-Pre?
mariema is offline   Reply With Quote

Old   April 17, 2017, 18:38
Default
  #8
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
ANSYS CFX User Fortran is the last resource when it comes to custom models like a source term.

How complex is your source that requires UserFortran ? Does it require control logic ? Usage of internal variables, or not readily available functionality ?

CEL is the most common form to customize ANSYS CFX.
Opaque is offline   Reply With Quote

Old   April 18, 2017, 12:27
Default
  #9
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
i am looking for a simple expression of the source term due to chemical reaction.Normally it is dependant of the variables that I calculated in the same code like temperature,the reaction rate; the enthalpy of formation. it's like the expression above but it must depend of reaction rate not of mass flow
Attached Images
File Type: png temperature.PNG (20.5 KB, 40 views)
mariema is offline   Reply With Quote

Old   April 19, 2017, 08:18
Default
  #10
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
Say, you have a mixture named Mixture compose of 4 materials: Mat1, Mat2, Mat3 and Mat4, you can write the source term as

MySource = (Mat1.Static Enthalpy * Mat1.Molar Mass +
Mat2.Static Enthalpy * Mat2.Molar Mass +
Mat3.Static Enthalpy * Mat3.Molar Mass +
Mat4.Static Enthalpy * Mat4.Molar Mass) /
(Mixture.Density * Mixture.Cp)

No UserFortran needed.
Opaque is offline   Reply With Quote

Old   April 19, 2017, 11:58
Default
  #11
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
i am calculating the temperature in reactive medium of the methan combustion so i have to use the source term of the species conservation equation (that i already calculated) to calculate the source term in energy equation. but i don't find big change in the temperature profile when it's supposed to climb from 300 K to 1600 K.
Attached Images
File Type: png termes sources.PNG (24.8 KB, 27 views)
mariema is offline   Reply With Quote

Old   April 19, 2017, 15:53
Default
  #12
Senior Member
 
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32
Opaque will become famous soon enough
If you are using ANSYS CFX for combustion, why do you need to reimplement the reaction mechanism ?

Are you solving a separate energy equation yourself ? ANSYS CFX does not solve for Temperature, but for Static Enthalpy and there is no need for reaction source terms whatsoever.

You are also trying to re-implement the Eddy Dissipation model which requires careful linearization..

As per writing the CEL you want, you need Mixture.Density, Mat1.Mass Fraction, Mat2.Mass Fraction.. A careful look at the ANSYS CFX documentation for CEL variables will list the available variables and how to prefix them for multi-component flows.
Opaque is offline   Reply With Quote

Old   April 20, 2017, 04:46
Default
  #13
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
Indeed, I'm writing a code in fortran i don't use ansys CFX So, the better way is to look at the Ansys CFX documenetation to check all variables.
If there any recommandation to a specific manual or link that demonstrate the Eddy Dissipation Model linearisation?
mariema is offline   Reply With Quote

Old   April 22, 2017, 04:52
Default
  #14
New Member
 
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 9
mariema is on a distinguished road
Finally, i find the solution i didn't multiply the source term by the volume . Thanks for your instructions Opaque that give a result
mariema is offline   Reply With Quote

Old   May 8, 2017, 23:47
Default decomposition reaction
  #15
Member
 
Shuai Wang
Join Date: May 2017
Location: TaiYuan.China
Posts: 30
Rep Power: 8
cfx_ws1992 is on a distinguished road
I am modeling a decomposition reaction of methane hydrate in CFX.But I donot find a relevant model in CFX .What can I do let me achieve this reaction.
cfx_ws1992 is offline   Reply With Quote

Old   May 9, 2017, 20:23
Default decomposition reaction
  #16
Member
 
Shuai Wang
Join Date: May 2017
Location: TaiYuan.China
Posts: 30
Rep Power: 8
cfx_ws1992 is on a distinguished road
I am modeling a decomposition reaction of methane hydrate in CFX.But I donot find a relevant model in CFX .What can I do let me achieve this reaction.
I am trying to use interphase mass transfer to simulate chemical reaction.But I have no sucesse.
cfx_ws1992 is offline   Reply With Quote

Reply


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
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
A source term in a vector equation CpCaniggia OpenFOAM Running, Solving & CFD 0 September 15, 2010 05:35
Bouyancy term in Energy equation CFDtoy Main CFD Forum 2 August 4, 2008 11:04
Mass transfer Term in Mixture Energy Equation CFDtoy Main CFD Forum 0 July 3, 2008 16:14
question about energy equation zhou FLUENT 0 February 23, 2004 23:55


All times are GMT -4. The time now is 01:48.