Exemplo n.º 1
0
            self.curr_time += diffuser.dt
        self.plotter.plot()


if __name__ == "__main__":
    cap = 0.0089285714
    tissue = 0.00892916955592076
    # the m values below are tuned for 40% saturation diffusing out of the capillaries and 60% remaining inside the capillaries
    # m values for 2x2, four way: m = .228
    # m values for 3x3, four way: m = .105
    # m values for 2x2, eight way: m = .2513
    # m values for 3x3, eight way: m = .098

    # the observed area, initial capillary value, initial tissue value, and fraction of capillaries "dead" (diffusing normally without replenishment) can be changed here.
    initializer = Initializer.Initializer3x3(
        rows=200, cols=200, cap=cap / 4, tissue=cap / 4,
        fraction_dead=.25)  # to view the 2x2 layout, replace 3x3 with 2x2
    # the tissue death threshold, and live tissue consumption can be changed here.
    diffuser = Diffuser.DiffuserEightWay(
        initializer.tissue,
        initializer.caps,
        initializer.cap_value,
        death_tissue=cap * .05,
        m=.098)  # to view the four way diffusion, replace Eight with Four

    # Comment / uncomment out the plotters below to generate different plots
    plotter = Plotter.InteractivePlotter(
        cap=initializer.cap_value
    )  # shows the visual evolution of the system over time,
    # capillaries can be turned off in real time, and time steps can be iterated through by pressing space