260 likes | 384 Views
OpenCMISS & CellML. Chris Bradley 1,2 & David Nickerson 1. 1 Auckland Bioengineering Institute, University of Auckland. 2 Department of Physiology, Anatomy and Genetics, University of Oxford. Why OpenCMISS?.
E N D
OpenCMISS& CellML Chris Bradley1,2 & David Nickerson1 1Auckland Bioengineering Institute, University of Auckland. 2Department of Physiology, Anatomy and Genetics, University of Oxford.
Why OpenCMISS? • We want to solve larger scale coupled models of the heart, lungs, stomach and other biological systems than we can currently solve • We need to redevelop legacy CMISS computational code. • Take advantage of modern High Performance computer architectures.
OpenCMISS • Re-engineering of CMISS • Main website • http://www.opencmiss.org/ • Open source on github • https://github.com/organizations/OpenCMISS • Fortran 95/2003. • Object “based”
OpenCMISS Design Goals • It should be a library based rather than a monolithic application. • It should use the Physiome standards FieldML and CellML. • It should be a general code. • It should be an inherently parallel code. • It should be used, developed, and understood by novices and experts alike. • It should deal with multiscale and multiphysics applications and with complicated workflows.
OpenCMISS library core library openCMISS library openCMISS (cm) openCMISS (cm) openCMISS (cm) External Program or script External Program or script External Program or script External Program or script OpenCMISS (cm) Language Bindings Language Bindings Language Bindings Language Bindings FieldML API FieldML API FieldML API FieldML API Fortran Fortran Fortran Fortran CellML API CellML API C/C++ C/C++ C/C++ C/C++ CellML API CellML API Python Python Python Python Etc. Etc. Etc. Etc. Processors FieldML file CellML file History file
OpenCMISS application Cmgui Com Layer Com Layer Com Layer Com Layer Com Layer openCMISS (cm) OpenCMISS openCMISS (cm) openCMISS (cm) Network FieldML API FieldML API FieldML API FieldML API FieldML API CellML API CellML API CellML API CellML API Processors FieldML file OpenCOR CellML file History file CellML API
General parallel environment CPU CPU CPU CPU Memory Memory Bus Bus Memory Memory Memory Memory C C C C C C C C Network Network C C C C C C C C Cache Cache Cache Cache Accel Accel Accel Accel C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C Hierarchy of heterogeneous computing elements
Multi-scale & Multi-physics • In order to accurately model biological systems OpenCMISS must model multiple physical systems at different time and space scales. • OpenCMISS deals with this via: • A flexible system for describing multiple models,solvers and workflows. • Methods for coupling different physical systems together. • Handling different spatial and temporal scales via FieldML and CellML
Multi-physics: Equations Sets • Can be broken down into • Linear/Nonlinear • Dynamic/Static • General form of OpenCMISS equations: Nonlinear Dynamic Source Linear RHS
Cell model = Extracellular Space e, e Iion Cell Membrane Intracellular Space i, i Example – Electrical Activation (Bidomain representation)
Bidomain equations Where: • Vm = transmembrane potential • i = intracellular potential • e = extracellular potential • Am = membrane surface/volume ratio • Cm = membrane capacitance • e = intracellular conductivity tensor • i = intracellular conductivity tensor • Iion = ionic source current from cellular model • Im = transmembrane stimulus current • ii = current injection per volume intro intracellular space • ie = current injection per volume intro extracellular space
IKs INa IKr2 IbNa IKr1 IpNa IKto Calcium Buffering IK1 IKATP TropC Ca2+ Calmodulin Na+ Na+ K+ K+ Na+ K+ Ca2+ K+ K+ K+ Vleak IbCa K+ Magnesium Buffering Na+ Vtr MgATP Ca2+ NSR Ca2+ Vup 3Na+ MgATP+ JSR Mg2+ MgADP DS Vdecay Vrel MgATP Ca2+ ICa-stretch 2K+ MgPi Ca2+ H+ 3MgADP+3Pi IK-stretch 3H+ H2PO4- VCO2transport INa-stretch Glycogenolysis H+ CO2 Contraction INS-stretch 3MgATP 3Na+ ImKATP IAn-stretch 2Lac ADP MgADP Intrinsic Buffers AK AMP MgATP Ca2+ K+ Cl- OxPhos PCr ADP+H+ MgATP MgADP+Pi+H+ Ca2+ CK NCE Cl- Cr ATP Na+ HCO-3 2Na+ Na+ HCO-3 CBE OH- Lac CHE H+ H2PO-4 H+ LAT NPE NHE NBC Cellular processes
IKs INa IKr2 IbNa IKr1 IpNa IKto IK1 IKATP TropC Ca2+ Calmodulin Na+ Na+ K+ K+ Na+ K+ Ca2+ K+ K+ K+ Vleak IbCa K+ Na+ Vtr MgATP Ca2+ NSR Ca2+ Vup 3Na+ MgATP+ JSR Mg2+ MgADP DS Vdecay Vrel MgATP Ca2+ ICa-stretch 2K+ MgPi Ca2+ H+ 3MgADP+3Pi IK-stretch 3H+ H2PO4- VCO2transport INa-stretch H+ CO2 INS-stretch 3MgATP 3Na+ ImKATP IAn-stretch 2Lac ADP MgADP Intrinsic Buffers AK AMP MgATP Ca2+ K+ Cl- OxPhos PCr ADP+H+ MgATP MgADP+Pi+H+ Ca2+ CK NCE Cl- Cr ATP Na+ HCO-3 2Na+ Na+ HCO-3 CBE OH- Lac CHE H+ H2PO-4 H+ LAT NPE NHE NBC Problem/Field description • Fields: • Geometric • Fibre • Material (i, e, Am, Cm etc.) • Potential (Vm, e, etc.) • Source (Iion, etc.) • Cellular state variables • Cellular intermediate variables • Cellular parameter variables
Field parameter vector Parameter vector, x 35 33 31 29 21 17 19 15 Component, u1 7 3 5 1 Field variable, u 35 32 33 34 31 30 28 29 27 25 24 26 23 21 20 22 17 16 18 19 15 Component, u2 14 13 10 9 11 12 8 6 3 7 2 Global DOFs 5 1 4
300% +50 mV +50 mV +50 mV 100% -85 mV -85 mV -85 mV Electrophysiology - CellML Stimulus off gNa Distribution Normal activation gNa activation
Finite Elasticity – Breast Mechanics Skin Undeformed Deformed Under gravity loading Breast Tissue Courtesy of Prasad Gamage
Fluid Mechanics – 3D NS Carotid Artery Flow, Re=100 Mesh Velocity Pressure Courtesy of David Ladd
CellML as a DOF black box Inputs Outputs Component 1 Field variable Component 2 Component 3 Parameter DOF Vector
IKs INa IKr2 IbNa IKr1 IpNa IKto IK1 IKATP TropC Ca2+ Calmodulin Na+ Na+ K+ K+ Na+ K+ Ca2+ K+ K+ K+ Vleak IbCa K+ Na+ Vtr MgATP Ca2+ NSR Ca2+ Vup 3Na+ MgATP+ JSR Mg2+ MgADP DS Vdecay Vrel MgATP Ca2+ ICa-stretch 2K+ MgPi Ca2+ H+ 3MgADP+3Pi IK-stretch 3H+ H2PO4- VCO2transport INa-stretch H+ CO2 INS-stretch 3MgATP 3Na+ ImKATP IAn-stretch 2Lac ADP MgADP Intrinsic Buffers AK AMP MgATP Ca2+ K+ Cl- OxPhos PCr ADP+H+ MgATP MgADP+Pi+H+ Ca2+ CK NCE Cl- Cr ATP Na+ HCO-3 2Na+ Na+ HCO-3 CBE OH- Lac CHE H+ H2PO-4 H+ LAT NPE NHE NBC OpenCMISSCellML Import CellMLEnvironment State Parameters Intermediate CellMLModel CellML Variables State Parameters Intermediate void computeRates( double VOI, double *PARAMETERS, double *RATES, double *STATES, double *INTERMEDIATE); { const double FIXED[..]; : : } Set as known Set as wanted Set as known and wanted Import
IKs INa IKr2 IbNa IKr1 IpNa IKto IK1 IKATP TropC Ca2+ Calmodulin Na+ Na+ K+ K+ Na+ K+ Ca2+ K+ K+ K+ Vleak IbCa K+ Na+ Vtr MgATP Ca2+ NSR Ca2+ Vup 3Na+ MgATP+ JSR Mg2+ MgADP DS Vdecay Vrel MgATP Ca2+ ICa-stretch 2K+ MgPi Ca2+ H+ 3MgADP+3Pi IK-stretch 3H+ H2PO4- VCO2transport INa-stretch H+ CO2 INS-stretch 3MgATP 3Na+ ImKATP IAn-stretch 2Lac ADP MgADP Intrinsic Buffers AK AMP MgATP Ca2+ K+ Cl- OxPhos PCr ADP+H+ MgATP MgADP+Pi+H+ Ca2+ CK NCE Cl- Cr ATP Na+ HCO-3 2Na+ Na+ HCO-3 CBE OH- Lac CHE H+ H2PO-4 H+ LAT NPE NHE NBC CellML Interface CellML environ Models State Parameters Intermediate OpenCMISS Field CellML Fields
CellML/Field Maps CellML environ Models State Parameters Intermediate Cellular model CellML to field Map Field to CellML Map CellML integrate Transmembrane Voltage Field
CellML/Field Maps CellML environ Models State Parameters Intermediate Constitutive Law CellML evaluate CellML to field Map Field to CellML Map Strain Field Stress Field
FPGA Acceleration Investigating using Field Programmable Gate Array (FPGAs) as accelerators for CellML equations (see Ting’s talk next).
Acknowledgements • A (hopefully complete) list of those individuals who have contributed to OpenCMISS (so far….) • David Ladd • Sander Land • Jack Lee • Caton Little • Xaio Bo Lu • Kumar Mithraratne • Christian Michler • Jennine Mitchell • Martyn Nash • David Nickerson • Steven Niederer • Poul Nielsen • ØyvindNordbø • David Nordsletten • StigOmholt • Ali Pashaei • VijayaraghavanRajagopal • BojanBlazevic • Andy Bowery • Chris Bradley • Randall Britten • Vincent Budelmann • PhaniChichapatnam • Richard Christie • Andrew Cookson • Andrew Crozier • Prasad Gamage • Arne Gjuvsland • Thomas Heidlauf • Alice Hung • Peter Hunter • JagirHussan • Chloe Irwin Whitney • Jessica Jor • Sebastian Krittian • Adam Reeve • Oliver Rohle • Ishani Roy • Ole W. Saastad • SoroushSafaei • Vickie Shim • Matt Sinclair • Nic Smith • Martin Steghofer • MerrynTawhai • Mark Trew • Jon Olav Vik • Tim Wu • Robert Jiahe Xi • Nancy (Xiani) Yan • Ting Yu • Heye Zhang • Ju Zhang