InitalCommit
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BaseCellSimulation.Enzyms.Membrane
|
||||
{
|
||||
public class NaK_ATPase : MembranEnzyme
|
||||
{
|
||||
public double ATPperCycle = 1.0;
|
||||
public double NaOutStoich = 3.0;
|
||||
public double KInStoich = 2.0;
|
||||
|
||||
public override void ComputeRate(double gradient, EnviromentState env)
|
||||
{
|
||||
|
||||
// niedriger Gradient → höhere Rate
|
||||
double effective = 1.0 / (1.0 + gradient);
|
||||
rate = Vmax * effective;
|
||||
}
|
||||
|
||||
public override void ApplyChanges(CellRessources res, double dt)
|
||||
{
|
||||
double flux = rate * dt;
|
||||
|
||||
// Verbrauch von ATP
|
||||
double atpNeeded = flux * ATPperCycle;
|
||||
if (res.Res.Energy.ATP < atpNeeded) flux *= res.Res.Energy.ATP / atpNeeded;
|
||||
|
||||
res.Res.Ions.Na -= NaOutStoich * flux; // Na raus
|
||||
res.Res.Ions.K += KInStoich * flux; // K rein
|
||||
res.Env.Na += NaOutStoich * flux;
|
||||
res.Env.K -= KInStoich * flux;
|
||||
res.ConsumeATP(atpNeeded);
|
||||
}
|
||||
|
||||
public override double CalculateGradient(CellRessources res)
|
||||
{
|
||||
return (res.Res.Ions.Na / res.Env.Na) * (res.Env.K / res.Res.Ions.K);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user