Skip to content

Commit

Permalink
Add JSON examples of DecaExpr and Decapode of composite model
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaris committed Nov 2, 2023
1 parent f604ab5 commit cc4872f
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"Var": [
{
"_id": 1,
"type": "Form0",
"name": "X"
},
{
"_id": 2,
"type": "Form0",
"name": "V"
},
{
"_id": 3,
"type": "Constant",
"name": "k"
},
{
"_id": 4,
"type": "infer",
"name": "mult_1"
},
{
"_id": 5,
"type": "infer",
"name": ""
},
{
"_id": 6,
"type": "Literal",
"name": "-1"
}
],
"TVar": [
{
"_id": 1,
"incl": 2
},
{
"_id": 2,
"incl": 5
}
],
"Op1": [
{
"_id": 1,
"src": 1,
"tgt": 2,
"op1": "∂ₜ"
},
{
"_id": 2,
"src": 2,
"tgt": 5,
"op1": "∂ₜ"
}
],
"Op2": [
{
"_id": 1,
"proj1": 6,
"proj2": 3,
"res": 4,
"op2": "*"
},
{
"_id": 2,
"proj1": 4,
"proj2": 1,
"res": 5,
"op2": "*"
}
],
"Σ": [],
"Summand": [],
"Type": [],
"Operator": [],
"Name": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"Var": [
{
"_id": 1,
"type": "Form0",
"name": "V"
},
{
"_id": 2,
"type": "Form0",
"name": "Q"
},
{
"_id": 3,
"type": "Constant",
"name": "κ"
},
{
"_id": 4,
"type": "Constant",
"name": "λ"
},
{
"_id": 5,
"type": "Parameter",
"name": "Q₀"
},
{
"_id": 6,
"type": "infer",
"name": ""
},
{
"_id": 7,
"type": "infer",
"name": "•2"
},
{
"_id": 8,
"type": "infer",
"name": "•3"
},
{
"_id": 9,
"type": "infer",
"name": "•4"
}
],
"TVar": [
{
"_id": 1,
"incl": 6
}
],
"Op1": [
{
"_id": 1,
"src": 2,
"tgt": 6,
"op1": "∂ₜ"
},
{
"_id": 2,
"src": 9,
"tgt": 8,
"op1": "λ"
}
],
"Op2": [
{
"_id": 1,
"proj1": 3,
"proj2": 1,
"res": 7,
"op2": "*"
},
{
"_id": 2,
"proj1": 2,
"proj2": 5,
"res": 9,
"op2": "-"
}
],
"Σ": [
{
"_id": 1,
"sum": 6
}
],
"Summand": [
{
"_id": 1,
"summand": 7,
"summation": 1
},
{
"_id": 2,
"summand": 8,
"summation": 1
}
],
"Type": [],
"Operator": [],
"Name": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"annotations": [],
"header": {
"description": "Velocity makes it get hot, but you dissipate heat away from Q\u2080",
"name": "fricative_heating",
"_type": "Header",
"model_version": "v1.0",
"schema": "modelreps.io/SummationDecapode",
"schema_name": "SummationDecapode"
},
"_type": "ASKEMDecaExpr",
"model": {
"context": [
{
"dim": "Form0",
"var": {
"name": "V",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Form0",
"var": {
"name": "Q",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Constant",
"var": {
"name": "\u03ba",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Constant",
"var": {
"name": "\u03bb",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Parameter",
"var": {
"name": "Q\u2080",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
}
],
"_type": "DecaExpr",
"equations": [
{
"rhs": {
"args": [
{
"f": "*",
"arg1": {
"name": "\u03ba",
"_type": "Var"
},
"_type": "App2",
"arg2": {
"name": "V",
"_type": "Var"
}
},
{
"f": "\u03bb",
"arg": {
"f": "-",
"arg1": {
"name": "Q",
"_type": "Var"
},
"_type": "App2",
"arg2": {
"name": "Q\u2080",
"_type": "Var"
}
},
"_type": "App1"
}
],
"_type": "Plus"
},
"lhs": {
"var": {
"name": "Q",
"_type": "Var"
},
"_type": "Tan"
},
"_type": "Eq"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"annotations": [],
"header": {
"description": "A Simple Harmonic Oscillator as a Diagrammatic Equation",
"name": "harmonic_oscillator",
"_type": "Header",
"model_version": "v1.0",
"schema": "modelreps.io/DecaExpr",
"schema_name": "DecaExpr"
},
"_type": "ASKEMDecaExpr",
"model": {
"context": [
{
"dim": "Form0",
"var": {
"name": "X",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Form0",
"var": {
"name": "V",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
},
{
"dim": "Constant",
"var": {
"name": "k",
"_type": "Var"
},
"space": "Point",
"_type": "Judgement"
}
],
"_type": "DecaExpr",
"equations": [
{
"rhs": {
"name": "V",
"_type": "Var"
},
"lhs": {
"var": {
"name": "X",
"_type": "Var"
},
"_type": "Tan"
},
"_type": "Eq"
},
{
"rhs": {
"args": [
{
"name": "-1",
"_type": "Lit"
},
{
"name": "k",
"_type": "Var"
},
{
"name": "X",
"_type": "Var"
}
],
"_type": "Mult"
},
"lhs": {
"var": {
"name": "V",
"_type": "Var"
},
"_type": "Tan"
},
"_type": "Eq"
}
]
}
}

0 comments on commit cc4872f

Please sign in to comment.