Files
WyanMueller d2e409d10f InitalCommit
2025-11-16 10:30:26 +01:00

40 lines
1.2 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BaseCellSimulation.Enzyms.Membrane
{
// ----------------------------------------------------------
// 3. PMCA – Ca²⁺-ATPase (Ca raus, ATP-abhängig)
// ----------------------------------------------------------
public class PMCA : MembranEnzyme
{
public double ATPperCycle = 1.0;
public override void ComputeRate(double caCyt, EnviromentState env)
{
// klassisch: Michaelis-Menten mit Ca²⁺-Abhängigkeit
rate = Michaelis_Menten(caCyt, Vmax, Km);
}
public override void ApplyChanges(CellRessources res, double dt)
{
double flux = rate * dt;
double atpNeeded = flux * ATPperCycle;
if (res.Res.Energy.ATP < atpNeeded) flux *= res.Res.Energy.ATP / atpNeeded;
res.Res.Ca.CytosolicCa -= flux; // Ca raus
res.Env.Ca += flux;
res.ConsumeATP(atpNeeded);
}
public override double CalculateGradient(CellRessources res)
{
return res.Res.Ca.CytosolicCa; // PMCA is not driven by a concentration gradient
}
}
}