Skip to content

Commit

Permalink
Add units in form
Browse files Browse the repository at this point in the history
  • Loading branch information
cbolles committed Nov 26, 2024
1 parent 03fce9e commit 99be4e4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const GlobalParamsView: React.FC<GlobalParamsViewProps> = ({ params }) =>
<CardHeader title="Global Parameters" titleTypographyProps={{ variant: 'h3' }} />
<CardContent>
<List>
<ListItem>Time Step: {params.timeStep} (h)</ListItem>
<ListItem>Time Step: {params.timeStep} (h/cycle)</ListItem>
<ListItem>Log Frequency: {params.logFreq}</ListItem>
<ListItem>Nutrient Diffusivity: {params.defaultDiffConst} (cm^2/s)</ListItem>
<ListItem>Default VMax: {params.defaultVMax} (mmol/gh)</ListItem>
Expand Down
19 changes: 12 additions & 7 deletions packages/frontend/src/pages/ExperimentForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const getSchema = (metaboliteType: MetaboliteType | null) => {
if (metaboliteType != MetaboliteType.Rich) {
metaboliteParams!.properties!['concentration'] = {
type: 'number',
title: 'Concentration (mmol/cm3)'
title: 'Concentration (M)'
};
metaboliteParams.required!.push('concentration');
}
Expand Down Expand Up @@ -117,11 +117,13 @@ const getSchema = (metaboliteType: MetaboliteType | null) => {
},
linearDiffusivity: {
type: 'number',
default: 0.001
default: 0.001,
title: 'Linear Diffusivity (cm^2/s)'
},
nonlinearDiffusivity: {
type: 'number',
default: 0.6
default: 0.6,
title: 'Nonlinear Diffusivity (cm^2/sg)'
}
},
required: ['name', 'neutralDriftAmp', 'deathRate', 'linearDiffusivity', 'nonlinearDiffusivity']
Expand All @@ -133,7 +135,8 @@ const getSchema = (metaboliteType: MetaboliteType | null) => {
properties: {
timeStep: {
type: 'number',
default: 0.1
default: 0.1,
title: 'Timestep (Hours/Cycle)'
},
logFreq: {
type: 'number',
Expand All @@ -142,15 +145,17 @@ const getSchema = (metaboliteType: MetaboliteType | null) => {
defaultDiffConst: {
type: 'number',
default: 0.000006,
title: 'Nutrient Diffusivity (cm2/s)'
title: 'Nutrient Diffusivity (cm^2/s)'
},
defaultVMax: {
type: 'number',
default: 10
default: 10,
title: 'Default VMax (mmol/gh)'
},
defaultKm: {
type: 'number',
default: 0.00001
default: 0.00001,
title: 'Default KM (M)'
},
maxCycles: {
type: 'number',
Expand Down

0 comments on commit 99be4e4

Please sign in to comment.