40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BaseCellSimulation.Enzyms.Membrane
|
|
{
|
|
public class MCT : MembranEnzyme
|
|
{
|
|
|
|
public override double CalculateGradient(CellRessources res)
|
|
{
|
|
double hGradient = Math.Pow(10, -res.pH_in) / Math.Pow(10, -res.pH_ext);
|
|
return res.Res.Carbon.Lactate - res.Env.Lactate * hGradient;
|
|
}
|
|
|
|
public override void ComputeRate(double Gradient, EnviromentState env)
|
|
{
|
|
if (Gradient <= 0)
|
|
{
|
|
rate = 0;
|
|
return;
|
|
}
|
|
|
|
Michaelis_Menten(Gradient);
|
|
}
|
|
|
|
public override void ApplyChanges(CellRessources res, double dt)
|
|
{
|
|
double flux = rate * dt;
|
|
|
|
res.Res.Carbon.Lactate -= flux; // Laktat raus
|
|
res.Env.Lactate += flux;
|
|
res.Res.Ions.Protons -= flux; // Protonen raus (Symport)
|
|
res.Env.Protons += flux;
|
|
}
|
|
}
|
|
}
|