dbirch997 / cantera

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

1D flame grid refinement bug #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

There is a bug in the code that prevents the refinement procedure from 
functioning properly. The length of spacing between grid points "dz" is used to 
determine whether points should be added based on curvature (line 155 in 
refine.cpp). dz is not calculated  before these decisions are made, which 
breaks the curvature check.

What is the expected output? What do you see instead?

1D flames are not being refined based on curvature. This leads to 
under-resolved solutions.

What version of the product are you using? On what operating system?

This bug is found in all versions.

Please provide any additional information below.

Original issue reported on code.google.com by watso...@gmail.com on 27 Dec 2010 at 2:00

GoogleCodeExporter commented 9 years ago
Dear Cantera user,
To define the curve parameter in file "refine.cpp", at line 156 (Cantera 1.8 
beta), the variable "dz" is used. The problem seems to be that dz is defined at 
line 181, after the for cycle used to refine the grid with slope and curve 
parameters. So whatever the value of the curve parameter, it is not used. To 
fixed that bug, I have replaced dz with z[j+1]-z[j] at line 156. It seems to 
work well. I have sent the script in the attached file.
Regards.
Ludovic Ponty.

Original comment by cybervac...@yahoo.fr on 17 Jan 2011 at 5:25

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Ludovic,

Yes, this is precisely what needs to be done to fix the bug in the code. This 
change should be added to the source.

Best wishes,

Graeme Watson

Original comment by watso...@gmail.com on 17 Jan 2011 at 6:09

GoogleCodeExporter commented 9 years ago

Original comment by yarmond on 28 May 2011 at 12:05

GoogleCodeExporter commented 9 years ago
Fixed in r1393.

Original comment by yarmond on 10 Apr 2012 at 3:14