|
[Sponsors] |
Combustion model:PaSR model in ReactingFoam2.2.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 5, 2013, 09:03 |
Combustion model:PaSR model in ReactingFoam2.2.1
|
#1 |
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 12 |
Hi Foamers,
The species eqn inReactingFoam is : Code:
fvScalarMatrix YiEqn ( fvm::ddt(rho, Yi) + mvConvection->fvmDiv(phi, Yi) - fvm::laplacian(turbulence->muEff(), Yi) == reaction->R(Yi) + fvOptions(rho, Yi) ); I found the following codes in src/combustionModels/PaSR/PaSR.C: Code:
template<class Type> Foam::tmp<Foam::fvScalarMatrix> Foam::combustionModels::PaSR<Type>::R(volScalarField& Y) const { tmp<fvScalarMatrix> tSu(new fvScalarMatrix(Y, dimMass/dimTime)); fvScalarMatrix& Su = tSu(); if (this->active()) { const label specieI = this->thermo().composition().species()[Y.name()]; Su += kappa_*this->chemistryPtr_->RR(specieI); } return tSu; } |
|
March 5, 2014, 06:44 |
|
#2 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 |
|
March 5, 2014, 12:53 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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/ |
|
March 6, 2014, 01:04 |
|
#4 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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>; active true; PaSRCoeffs { Cmix 0.147; turbulentReaction on; useReactionRate yes; } 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) Thanks in advance. Thamali |
|
March 6, 2014, 12:35 |
|
#5 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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) |
|
April 21, 2014, 05:27 |
Foam::combustionModels::PaSR<Foam::combustionModel s::psiChemistryCombustion>::correct
|
#6 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 |
|
April 22, 2014, 12:49 |
|
#7 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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? |
|
April 23, 2014, 02:07 |
simplified case
|
#8 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 Last edited by Thamali; April 23, 2014 at 04:04. Reason: error |
|
April 23, 2014, 12:51 |
|
#9 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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. |
|
April 28, 2014, 04:09 |
Debug version run
|
#10 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 #1 Foam::sigFpe::sigHandler(int) at ~/OpenFOAM/OpenFOAM-2.2.2/src/OSspecific/POSIX/signals/sigFpe.C:117 #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 in "/lib/x86_64-linux-gnu/libm.so.6" #4 Foam::sqrt(double) at ~/OpenFOAM/OpenFOAM-2.2.2/src/OpenFOAM/lnInclude/Scalar.H:258 #5 Foam::combustionModels::PaSR<Foam::combustionModels::psiChemistryCombustion>::correct() at ~/OpenFOAM/OpenFOAM-2.2.2/src/combustionModels/PaSR/PaSR.C:111 (discriminator 2) #6 at ~/OpenFOAM/OpenFOAM-2.2.2/applications/solvers/combustion/reactingFoam/YEqn.H:14 #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 at ??:? Floating point exception (core dumped) 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 Last edited by Thamali; April 28, 2014 at 04:47. Reason: adding more results |
|
April 28, 2014, 13:30 |
|
#11 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
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.
|
|
May 29, 2014, 02:10 |
Thanking
|
#12 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 |
|
September 3, 2014, 20:37 |
reactingFoam: Floating Point Exception
|
#13 |
New Member
|
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 |
|
September 4, 2014, 00:11 |
|
#14 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
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 |
|
March 27, 2015, 15:04 |
|
#15 | |
Member
Howar
Join Date: Mar 2015
Posts: 53
Rep Power: 11 |
Quote:
|
||
March 30, 2015, 07:04 |
PaSR model
|
#16 |
Member
Thamali
Join Date: Jul 2013
Posts: 67
Rep Power: 12 |
Dear Howard,
I'll give you some references about PaSR model.As per my knowledge it has been developed by Chalmers university.
Thamali |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
eddy dissipation model: combustion doesn't occur | roukaia | FLUENT | 2 | November 18, 2020 10:23 |
Liquid rocket engine non-premixed combustion model | Erik | FLUENT | 2 | November 28, 2013 14:09 |
eddy dissipation model: combustion doesn't occur | roukaia | FLUENT | 0 | December 24, 2011 09:10 |
Combustion Model for CAI/HCCI - AVL FIRE | Patryk | Main CFD Forum | 0 | July 24, 2009 16:43 |
combustion model | Hennie van der Westhuizen | Siemens | 7 | February 27, 2002 02:10 |