|
[Sponsors] |
June 7, 2006, 09:50 |
Source term in energy equation
|
#1 |
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 |
|
June 7, 2006, 10:00 |
Re: Source term in energy equation
|
#2 |
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.. |
|
June 7, 2006, 10:02 |
Re: Source term in energy equation
|
#3 |
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.
|
|
June 7, 2006, 11:58 |
Re: Source term in energy equation
|
#4 |
Guest
Posts: n/a
|
Thanks I try youre sugestion and now it's working Thanks a lot
|
|
April 15, 2017, 07:33 |
|
#5 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
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
|
|
April 15, 2017, 19:53 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,854
Rep Power: 144 |
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. |
|
April 17, 2017, 19:13 |
|
#7 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
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?
|
|
April 17, 2017, 19:38 |
|
#8 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
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. |
|
April 18, 2017, 13:27 |
|
#9 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
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
|
|
April 19, 2017, 09:18 |
|
#10 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
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. |
|
April 19, 2017, 12:58 |
|
#11 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
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.
|
|
April 19, 2017, 16:53 |
|
#12 |
Senior Member
Join Date: Jun 2009
Posts: 1,873
Rep Power: 33 |
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. |
|
April 20, 2017, 05:46 |
|
#13 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
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? |
|
April 22, 2017, 05:52 |
|
#14 |
New Member
Mariem
Join Date: May 2016
Posts: 12
Rep Power: 10 |
Finally, i find the solution i didn't multiply the source term by the volume . Thanks for your instructions Opaque that give a result
|
|
May 9, 2017, 00:47 |
decomposition reaction
|
#15 |
Member
Shuai Wang
Join Date: May 2017
Location: TaiYuan.China
Posts: 30
Rep Power: 9 |
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.
|
|
May 9, 2017, 21:23 |
decomposition reaction
|
#16 |
Member
Shuai Wang
Join Date: May 2017
Location: TaiYuan.China
Posts: 30
Rep Power: 9 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
A source term in a vector equation | CpCaniggia | OpenFOAM Running, Solving & CFD | 0 | September 15, 2010 06:35 |
Bouyancy term in Energy equation | CFDtoy | Main CFD Forum | 2 | August 4, 2008 12:04 |
Mass transfer Term in Mixture Energy Equation | CFDtoy | Main CFD Forum | 0 | July 3, 2008 17:14 |
question about energy equation | zhou | FLUENT | 0 | February 24, 2004 00:55 |