55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BaseCellSimulation.Enzyms.Mytochondrion
|
|
{
|
|
public class OxPhosEnzyme : InternalEnzym
|
|
{
|
|
public double PO_Ratio { get; set; } = 2.5;
|
|
|
|
public OxPhosEnzyme()
|
|
{
|
|
Vmax = 0.8;
|
|
Km = 0.01;
|
|
|
|
}
|
|
|
|
public override void ApplyChanges(CellRessources res, double dt)
|
|
{
|
|
double usedNADH = Math.Min(rate * dt, res.Res.Energy.NADH);
|
|
if (usedNADH <= 0) return;
|
|
|
|
res.TransferNADH(usedNADH, true);
|
|
|
|
double o2Consumed = 0.5 * usedNADH;
|
|
res.Res.Oxygen = Math.Max(0.0, res.Res.Oxygen - o2Consumed);
|
|
|
|
double atpMade = PO_Ratio * usedNADH;
|
|
res.RegenerateATP(atpMade);
|
|
|
|
// ROS-Produktion
|
|
double rosFactor = Math.Min(1.0, res.Res.Oxygen / 2.0);
|
|
res.Res.Ions.H2O2 += usedNADH * 0.001 * rosFactor;
|
|
res.Res.Protein.Waste += usedNADH * 0.001 * rosFactor;
|
|
}
|
|
|
|
public override void ComputeRate(Resources res)
|
|
{
|
|
double nadh = res.Energy.NADH;
|
|
Michaelis_Menten(nadh);
|
|
|
|
// Begrenzung durch O2
|
|
double o2Limit = Math.Min(1.0, res.Oxygen / 0.05);
|
|
rate *= o2Limit;
|
|
|
|
// ATP/ROS Feedback
|
|
double atpFactor = Math.Clamp(res.Energy.ATP / 0.5, 0.0, 1.0);
|
|
double wasteFactor = 1.0 / (1.0 + res.Protein.Waste / 10.0);
|
|
rate *= atpFactor * wasteFactor;
|
|
}
|
|
}
|
|
}
|