hkmoffat / cantera

Automatically exported from code.google.com/p/cantera
0 stars 0 forks source link

Implementation of reduced chemistry(ckwyp.f) #121

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Target:
Implementation of ckwyp.f routine into 1-D flame simulation

Solution Idea:
We are aiming at implementation of new kinetics manager for reduced chemistry, 
where the reaction rates will be evaluated based on user-specified Fortran 
subroutine (ckwyp.f) instead of Arrhenius constants

Current progress:
1) New type of kinetics manager (ReducedKinetics.cpp,h) in 
KineticsFactory.cpp,h linked to the ckwyp.f file
2) Testing case - CHEMKIN format data for 19-species CH4 reduced mechanism (Lu 
and Law, Combust.Flame 2008) => chem.cti
3) Results in segmentation fault error
4) ? (Could you please advice how to continue?)

Thanks a lot for any suggestions!
Michal Vasinek

Original issue reported on code.google.com by vaanwiz...@gmail.com on 12 Oct 2012 at 8:58

Attachments:

GoogleCodeExporter commented 9 years ago
(1) Your implementation of get_wdot leaks memory every time it is called. Since 
the Fortran function you're calling doesn't actually use rwrk and iwrk, you can 
skip allocating these arrays and just pass in NULL for those parameters.
(3) The declaration of ckwyp_ is incorrect. Because Fortran passes arguments by 
reference, all parameters to this function should be pointers.
(2) Try compiling with debug info enabled, then run the program in gdb and see 
where the segmentation fault occurs.

Original comment by yarmond on 12 Oct 2012 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 12 Oct 2012 at 3:40

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 12 Nov 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Hi Michal Vasinek

I am trying the same problem. I am writing UDF to call ckwyp.f. I am facing 
problem in linking file.

Please help

Thanks 
Nimesh

Original comment by nimeshth...@gmail.com on 7 Jul 2014 at 10:01