Combustion model:PaSR model in ReactingFoam2.2.1
Hi Foamers,
The species eqn inReactingFoam is : Code:
I found the following codes in src/combustionModels/PaSR/PaSR.C: Code:
template<class Type> |
I do not know whether you solved your problem.But I think you can refer chemistryModel.C file,although I have no idea how this "chemistryPtr" pointer connects to it.
If you have any idea please help me too. Thamali |
For more information on the usage of this:
http://www.tutorialspoint.com/cplusp...is_pointer.htm The reasons is that the chemistryType is templated on the thermo types. Thamali is right that the function you want is in chemistryModel.C. One way to see this is to look at the online code documentation for OpenFOAM, as you can trace the inheritance diagram. http://www.openfoam.org/docs/cpp/ |
Marco,
Thanks for your reply.I need more help.:) If we are using following in PaSR model,do we have to switch on the chemistry in reactingFoam. Code:
combustionModel PaSR<psiChemistryCombustion>; To find out about this error and to understand about more on the usage of Code:
chemistry on In PaSR,it handles chemistry on its own,when Code:
useReactionRate yes Code:
useReactionRate yes If so,whether chemistry is on/off,the other properties in "chemistryProperties" file are active,is it? What really happens when chemistry switch is on?I am confused.(you may think this must be the 1st question):confused: Thanks in advance. Thamali |
If you look in the file PaSR.C, in the combustion->correct() function you will see this if statement:
Code:
if (this->active()) The second question about useReactionRate can be also answered by looking at the correct() function. I'll leave you to figure that one out and post the answer. When you are unsure what a keyword or parameter does that is in a Coeffs dictionary, have a look at the constructor for the object, see where the value of the key is stored and where it is later used (grep is your friend) |
Foam::combustionModels::PaSR<Foam::combustionModel s::psiChemistryCombustion>::correct
Dear Marco and other foamers,
I am sorry for not replying the former thread.I am really stucked with running a case which is necessary for completion of my MSc.Actually my major part of MSc was to develop a solver to model a packed bed in a wood chip combustion boiler.I have completed that part(though it is not very advanced).My next part is to use resulting packed bed parameters to be used to model free-board region combustion. I have uploaded it to the following link. https://www.dropbox.com/sh/4jew3uxfrt7ddtd/cazVzK0X3F For that case I am using "reactingFoam" and "PaSR" as combustion model.I have so much of doubts in presenting reactions,turbulence property values,etc.
Case always stops at some point with Floating Point Exception and I have failed to figure out where is the problem. The error is; PHP Code:
Thanks. Thamali |
Thamali, have you run your solver/cases with a debug version of OpenFOAM. The error message you have is pretty vague and doesn't give much indication as to where the code dies.
Could you also post the last few timesteps and all associated error messages? |
simplified case
Dear Marco,
I am very glad you replied.I did not run with Debug version. I did some simplifications for the case for now to solve this issue.
https://www.dropbox.com/sh/gbwuj5xxhaxew3s/ZU8ncig617
when looking at Residulas at the time of error residuals seems like go to infinity. Thank you very much again for your reply and eager for a reply. With Regards, Thamali |
Whenever you are making your own solvers with custom sub-models, the debug version can help greatly as the stack track will give you the line numbers where the crash occurs (99% of the time anyway).
To set this up, you need to change the WM_COMPILE_OPTION from "Opt" to "Debug", source your bashrc file and then recompile the entire OpenFOAM installation, including your solver and models. |
Debug version run
Dear Marco,
I ran the case in Debug version following your instructions.(for the same case in https://www.dropbox.com/sh/gbwuj5xxhaxew3s/ZU8ncig617 ). Now the error is as follows, Code:
#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/printStack.C:221 HTML Code:
Cmix_*Foam::sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL)) HTML Code:
sqrt(muEff[i]/rho[i]/(epsilon[i] + SMALL))
Yeaaaah, It is this "rho" value is (-)ve at 3 points in time=0.0217543.I am adding "rho" file 0.0217543 to the link https://www.dropbox.com/sh/gbwuj5xxhaxew3s/ZU8ncig617 . Do you have any idea which could lead to this? and also I cannot find from where this "rhoEqn.H" come to "reactingFoam.C"? Please try to help. Thanks in advance. Thamali |
reactingFoam uses the compressible rhoEqn from the default CFD library in $FOAM_SRC/finiteVolume/cfdTools/compressible/rhoEqn.H. If your density is becoming negative, I would check your boundar conditions and chemistry. Also, I would be sure that the density works properly with chemistry off first.
|
Thanking
Dear Marco,
It was an error in initial conditions which made sum of initial mass fractions were greater than 1. Took a long time to point out that since i never thought that type of error would occur. Anyway thank you very much for your kind help. Regards, Thamali |
reactingFoam: Floating Point Exception
Dear Thamali
I have the same problem (FPE) you posted in this thread, and congratulations you have solved the problem. But I can't open the links you gave, could you share me your case settings? So I can set my case with reference to your settings (Cmix, k, mut, initial Chemical time step, odeCoeffs and initial and boundary conditions). Regards Francis |
Dear Francis,
I will put you a working case . https://www.dropbox.com/sh/6edomtqox...tW153vFaa?dl=0 but,i do not know your real problem.If this does not work;you can tell us more detail to see whether we can help. Thanks Thamali |
Quote:
|
PaSR model
Dear Howard,
I'll give you some references about PaSR model.As per my knowledge it has been developed by Chalmers university.
Thamali |
All times are GMT -4. The time now is 14:22. |