Skip to content

Commit

Permalink
choose new parameters to make setup more realistic in terms of numerical
Browse files Browse the repository at this point in the history
values and time-scales
  • Loading branch information
jonaspleyer committed Apr 30, 2024
1 parent a1f26ee commit ecadab0
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cellular_raza-examples/sender-receiver/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ pub const CELL_MECHANICS_POTENTIAL_STRENGTH: f64 =
pub const CELL_MECHANICS_DAMPING: f64 = 2.0 / MINUTE;

// Reaction parameters of the cell
pub const CELL_LIGAND_TURNOVER_RATE: f64 = 10.0 / MINUTE;
pub const CELL_LIGAND_UPTAKE_RATE: f64 = 0.5 / MINUTE;
pub const CELL_LIGAND_TURNOVER_RATE: f64 = 0.05 / SECOND;
pub const CELL_LIGAND_UPTAKE_RATE: f64 = 0.1 / SECOND;

// Parameters for domain
pub const DOMAIN_SIZE: f64 = 300.0 * MICRO_METRE;
Expand All @@ -37,12 +37,12 @@ pub const DOMAIN_SIZE: f64 = 300.0 * MICRO_METRE;
pub const VOXEL_LIGAND_DIFFUSION_CONSTANT: f64 = 100.0 * MICRO_METRE * MICRO_METRE / SECOND;

// Controller parameters
pub const TARGET_AVERAGE_CONC: f64 = 2.0 * MOLAR;
pub const TARGET_AVERAGE_CONC: f64 = 1.0 * MOLAR;

// Time parameters
pub const DT: f64 = 0.25 * SECOND;
pub const DT: f64 = 0.1 * SECOND;
pub const T_START: f64 = 0.0 * MINUTE;
pub const T_END: f64 = 40.0 * MINUTE;
pub const T_END: f64 = 60.0 * MINUTE;
pub const SAVE_INTERVAL: f64 = 0.5 * MINUTE;

// Meta Parameters to control solving
Expand Down Expand Up @@ -145,11 +145,12 @@ fn main() -> Result<(), SimulationError> {
storage,
SRController::new(TARGET_AVERAGE_CONC, 0.1 * MOLAR / SECOND).strategy(
ControlStrategy::PID(PIDSettings {
k_p: 0.05 * MOLAR / MINUTE,
t_d: 5.0 * MINUTE,
t_i: 10.0 * MINUTE,
save_path: save_path.join("pid_controller.csv"),
})),
k_p: 0.075 * MOLAR / MINUTE,
t_d: 1.0 * MINUTE,
t_i: 10.0 * MINUTE,
save_path: save_path.join("pid_controller.csv"),
}),
),
// SRController::new(TARGET_AVERAGE_CONC)
// .strategy(ControlStrategy::DelayODE(DelayODESettings {
// sampling_prod_low: 0.0 * MOLAR / SECOND,
Expand Down

0 comments on commit ecadab0

Please sign in to comment.