|
[Sponsors] |
January 5, 2016, 01:44 |
How can I refer to gas constant?
|
#1 |
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 11 |
Dear Sir,
I am trying customizing the reactingFoam solver that I put an equation including gas constant R() in the YEqn.H. I think gas constant R() and molecular weight W() are in "specieI.H", so I discribe the equation to "specie->R()". However, when I compile my new solver, the message "'specie' was not declared in this scope" has occur and cannot compile. How can I do to refer to gas constant? Sincerely, KeiJun |
|
January 5, 2016, 05:40 |
|
#2 | |
Member
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 11 |
Quote:
Have you tried the methods in this thread? Regards, Yan
__________________
Blog: http://blog.sina.com.cn/multiphyzks RG:https://www.researchgate.net/profile/Yan_Wang154 |
||
January 5, 2016, 20:40 |
|
#3 |
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 11 |
Hi Yan,
I have never read the thread you show, and now read it. But I don't understand the thread very much. Tentatively, I write the following code to createFields.H of my new solver: #include "specie.H" specie theSpecie(thermoProps.subDict("mixture")); When I compile it, the following message are shown: ~/specieI.H:30.1: error: 'namespace' definition is not allowed here namespace Foam createFields.H: error: 'specie' was not declared in this scope specie theSpecie(thermoProps.subDict("mixture")); What should I do? KeiJun |
|
January 7, 2016, 19:54 |
|
#4 |
Member
Join Date: Jul 2015
Posts: 33
Rep Power: 11 |
Dear Sir,
I keep trying making my solver, but cannot compile. Now I customize the source code like this: ・put #include "specie.H" to myReactionFoam.C ・put equations including R or W to createFields.H ・the R or W are written such as specie::R() or specie::W() However, when I compile this solver, the error message cannot call member function 'Foam::scalar Foam::specie::R() const' without object has come. Here, the equations I want to add are the partial pressures of each component. Then, each partial pressure is defined such as volScalarField pN2 in the createFields.H, and these are calculated from the total pressure p, the partial density ρN2 (= ρ*Y[i]), R and the temperature T at each time and each cell. I think R and W are calculated in specieI.H and the class of which is specie, so I descibe specie::R(), but the error mensioned above has come. Could you teach me how to describe? I am really looking forward to your reply. Sincerely, KeiJun |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
fluid flow but temperature raises from nowhere? | mxcfd | STAR-CCM+ | 5 | September 16, 2014 06:46 |
Ideal gas problem | Atze | CFX | 12 | March 20, 2014 16:56 |
Error message when model as constant gas | Anna Tian | FLUENT | 0 | January 14, 2014 06:33 |