4.5.2 Modifying the Reaction Physics
In this exercise we're going to make a simple change to the model
implemented by Reaction component. Instead of the temperature
) being constant, it will increase with time. Heat is
produced in a localized area, and diffuses away from the source.
- Go to the top of the Bocca project for the PDE exercises:
- Edit the implementation of the compute method of the
bocca edit -i Reaction compute|
- Scroll down to the line
double r0 = 0.0 ; // Temperature does not change in a BZ reaction
and comment it out with a // at the beginning of the
line. Insert a new definition for r0 after r1 and
r2 are defined: double r0 = sqrt(r1*r2);.
- Recompile the project and verify that the modified component
passes the basic instantiation tests:
- Use the procedures of Section 4.4 to run a
simulation with the new initial conditions and view the results.
field should show structure. Remember that you
can plot this field in gnuplot with the triplet 1:2:3 at
the end of your splot command. Note that you've been
working in the $PDE_STUDENT_SRC, while for
the Section 4.4 procedures you need to be in
David E. Bernholdt [bek] 574-3147