これまでテキストベースで解析結果のサマリーが出力される,output.jsonを提供しておりましたが,可読性がなかったため,この度可読性のある新しいフォーマットに変更いたしました。
併せて,メッシュ情報をmesh_info.jsonに,収束過程をconvergence_history.jsonに分けて出力するようにいたしました。
例として,以下のように出力されます。数値の桁数は固定フォーマットであったテキストベースのoutputよりも増やしています。
フォーマットの説明は別途まとめる予定です。
出力結果例 : Problem20
◆output.json
時間ステップデータは別のキー(key)として時刻を値(value)として格納しています。
ポスト出力は項目ごとに配列として格納されています。
{
“metaData” :
{
“EMSolutionVersion” : “2024.11.1”,
“releaseDate” : “November 15, 2024”,
“creationDate” : “Mon Dec 2 10:51:56 2024”,
“comments” : “This file is converted from the EMSolution output data.”
},
“analysisCondition” :
{
“analysisType” : “STATIC”,
“nonlinear” : “NONLINEAR”,
“motionType” : “NONE”,
“circuitType” : “CIRCUIT”
},
“postDataList” :
{
“numData” : 3,
“dataList” : [ “CIRCUIT”, “FLUX_LOOP”, “NODAL_FORCE” ]
},
“timeStep” :
{
“numSteps” : 4,
“stepNo” : [ 1, 2, 3, 4 ],
“timeUnit” : “second”,
“time” : [ 1.00000000000000000e+00, 2.00000000000000000e+00, 3.00000000000000000e+00, 4.00000000000000000e+00 ]
},
“postData” :
{
“circuit” :
{
“circuitUnit” : [ “A”, “V”, “Wb” ],
“sourceData” :
[
{
“serialNum” : 1,
“current” : [ 1.00000000000000000e+03, 3.00000000000000000e+03, 4.50000000000000000e+03, 5.00000000000000000e+03 ],
“voltage” : [ 0.00000000000000000e+00, 0.00000000000000000e+00, 0.00000000000000000e+00, 0.00000000000000000e+00 ],
“flux” : [ 1.48166475445972933e-04, 3.82474813407498093e-04, 4.42233600570968275e-04, 4.55838731806167716e-04 ]
}
],
“powerSourceData” :
[
{
“serialNum” : 1,
“current” : [ 1.00000000000000000e+03, 3.00000000000000000e+03, 4.50000000000000000e+03, 5.00000000000000000e+03 ],
“voltage” : [ 0.00000000000000000e+00, 0.00000000000000000e+00, 0.00000000000000000e+00, 0.00000000000000000e+00 ]
}
]
},
“magFlux” :
{
“fluxUnit” : [ “Wb” ],
“numLoops” : 2,
“fluxData” :
[
{
“loopNum” : 1,
“flux” : [ 4.42286439352644151e-05, 1.11718426002835360e-04, 1.25318524896776673e-04, 1.28068986281457581e-04 ]
},
{
“loopNum” : 2,
“flux” : [ -4.16670866973313609e-05, -1.12385403661211433e-04, -1.37194890820822478e-04, -1.43926786278789532e-04 ]
}
]
},
“forceNodal” :
{
“forceUnit” : [ “N”, “Nm” ],
“forceNodalData” :
[
{
“propertyNum” : 11,
“forceX” : [ 1.96646437837345434e+00, 1.63617961175906323e+01, 3.00676233757311486e+01, 3.47918122063504214e+01 ],
“forceY” : [ 1.79173841794769784e+00, 1.99456555877840707e+01, 4.65282297732953865e+01, 5.63968651165919397e+01 ],
“forceZ” : [ -2.08614991092194346e+00, -1.40441404642384615e+01, -1.90682644186989201e+01, -2.03744765208280540e+01 ],
“forceMX” : [ -1.34587372247446879e-01, -1.45914974670510933e+00, -3.36110110666427842e+00, -4.06921523151102082e+00 ],
“forceMY” : [ 2.04230787987652262e-01, 1.59606324790803100e+00, 2.73313805391021969e+00, 3.11202855878988505e+00 ],
“forceMZ” : [ 9.00314647044476828e-03, 1.02734233775799488e-01, 2.42544820088562263e-01, 2.94568649338041166e-01 ]
},
{
“propertyNum” : 12,
“forceX” : [ -1.27893949746988866e+00, -8.78461516503218220e+00, -1.24574462072089069e+01, -1.34552991624929579e+01 ],
“forceY” : [ 1.31920242448663821e-01, 8.63664306274393945e-01, 1.39417227042872383e+00, 1.57824580379756574e+00 ],
“forceZ” : [ 2.15846304285227975e+00, 1.45896614792065318e+01, 2.00009651503387218e+01, 2.14426441349146515e+01 ],
“forceMX” : [ -5.06525119718559055e-03, -3.42217823343577005e-02, -6.55936603960499409e-02, -7.76162701153248064e-02 ],
“forceMY” : [ -1.67098162462901101e-01, -1.14668809922183335e+00, -1.62053271904345131e+00, -1.74879797875372689e+00 ],
“forceMZ” : [ 8.01409110182626713e-03, 5.11470237637346933e-02, 7.58712322991810517e-02, 8.35414712966777856e-02 ]
},
{
“propertyNum” : “total”,
“forceX” : [ 6.85529902003206626e-01, 7.57324962331831841e+00, 1.76098898839766704e+01, 2.13374640788715411e+01 ],
“forceY” : [ 1.93856941849383846e+00, 2.09064267552424283e+01, 4.80517900025875093e+01, 5.81124431805199606e+01 ],
“forceZ” : [ 1.01744959988614034e-01, 7.33498759778158482e-01, 1.17713274371946719e+00, 1.32648610843530168e+00 ],
“forceMX” : [ -1.40006746873154758e-01, -1.49537792097440447e+00, -3.42911459474977187e+00, -4.14932571105518999e+00 ],
“forceMY” : [ 3.63043457629471031e-02, 4.45123986419308171e-01, 1.10761706521606773e+00, 1.35810283799438092e+00 ],
“forceMZ” : [ 1.71381056474506008e-02, 1.54599240651125985e-01, 3.19322647053077835e-01, 3.79058923513774293e-01 ]
}
]
}
}
}
◆Pythonの利用
Pythonを使用することで,簡単に"postData"キーに格納されているデータを取り出すことができます。
with open(output.json
, ‘r’) as file:
data = json.load(file)
# Extract “forceZ” of “total” data
force_json = data[“postData”][“forceNodal”][“forceNodalData”]
forceZ_total = force_json[2][“forceZ”] # 配列の3番目が”total”
◆mesh_info.jsonの利用
テキストベースのoutputの最初に出力されるメッシュ情報をJSON形式で格納しています。
{
“metaData” :
{
“EMSolutionVersion” : “2024.11.1”,
“releaseDate” : “November 15, 2024”,
“creationDate” : “Mon Dec 2 10:51:43 2024”,
“comments” : “This file is converted from the EMSolution output data.”
},
“analysisCondition” :
{
“analysisType” : “STATIC”,
“nonlinear” : “NONLINEAR”,
“motionType” : “NONE”,
“circuitType” : “CIRCUIT”
},
“meshInfo” :
{
“no_meshes” : 1,
“GlobalMesh” :
{
“meshSummary” :
{
“no_nodes” : 45448,
“no_volume_elements” : 41514,
“no_surface_elements” : 2854,
“no_edgess” : 132298
},
“nodesSummary” :
{
“on_Bn=0_planes” : 3120,
“on_Ht=0_planes” : 0,
“on_far_boundaries” : 4748,
“on_periodic_faces” : 0,
“on_conductors” : 0
},
“edgeSummary” :
{
“on_Bn=0_planes” : 6128,
“on_Ht=0_planes” : 0,
“on_far_boundaries” : 9384,
“on_periodic_face” : 0,
“on_conductors” : 0,
“on_interface_of_potential_regions” : 5816
},
“volumeElementSummary” :
{
“HEXA_N8E12” : 41514,
“in_conductors” : 0,
“in_magnetic_regions” : 7248,
“in_non_linear_magnetic_regions” : 7248,
“in_air_regions” : 34266,
“in_total_potential_regions” : 10037,
“in_reduced_potential_regions” : 31477
},
“surfaceElementSummary” :
{
“QUAD_N4E4” : 2854,
“in_surface_conductors” : 0,
“in_surface_impedance_regions” : 0,
“in_surface_gap_regions” : 0
}
}
}
}
◆convergence_history.jsonの利用
テキストベースのoutputに計算実行時に出力されるICCG反復回数や非線形反復回数などの収束過程をJSON形式で格納しています。
{
“metaData” :
{
“EMSolutionVersion” : “2024.11.1”,
“releaseDate” : “November 15, 2024”,
“creationDate” : “Mon Dec 2 10:51:44 2024”,
“comments” : “This file is converted from the EMSolution output data.”
},
“analysisCondition” :
{
“analysisType” : “STATIC”,
“nonlinear” : “NONLINEAR”,
“motionType” : “NONE”,
“circuitType” : “CIRCUIT”
},
“timeStep” :
{
“numSteps” : 4,
“stepNo” : [ 1, 2, 3, 4 ],
“timeUnit” : “second”,
“time” : [ 1.00000000000000000e+00, 2.00000000000000000e+00, 3.00000000000000000e+00, 4.00000000000000000e+00 ]
},
“convergenceHistory” :
{
“convergence” :
[
[ true, true, true, true ],
[ true, true, true, true, true, true, true ],
[ true, true, true, true, true ],
[ true, true, true ]
],
“no_iterations” :
[
[ 46, 57, 42, 26 ],
[ 47, 43, 46, 44, 36, 28, 11 ],
[ 41, 45, 47, 47, 28 ],
[ 37, 48, 27 ]
],
“residual” :
[
[ 9.11083655616231475e-04, 9.11083655616231475e-04, 1.55270932509653014e-05, 1.55270932509653014e-05 ],
[ 5.47223536717706413e-04, 5.47223536717706413e-04, 1.63096905279204462e-04, 1.63096905279204462e-04, 7.81872179674130552e-05, 7.81872179674130552e-05, 3.60160951906676266e-05 ],
[ 2.96219104787612145e-04, 2.96219104787612145e-04, 3.71815203991677639e-05, 3.71815203991677639e-05, 1.01138601835891435e-05 ],
[ 9.21798777739598675e-05, 9.21798777739598675e-05, 1.21270856381379483e-06 ]
],
“NR” :
{
“residual” :
[
[ 1.00000000000000000e+00, 1.55933456737661676e-02, 2.53835457842131610e-03, 3.24618454292038274e-04, 3.24618454292038274e-04 ],
[ 6.66666667228803411e-01, 1.84496905989500193e-01, 7.87929373168494707e-02, 4.07795271378328036e-02, 1.28337245422060243e-02, 2.73762936973708784e-03, 5.10172517985197737e-04, 5.10172517985197737e-04 ],
[ 3.33333333884236471e-01, 3.79597257172477540e-02, 1.10832127435906789e-02, 1.56470827449713785e-03, 3.98730138937024143e-05, 3.98730138937024143e-05 ],
[ 1.00000006338632749e-01, 1.37902697267980215e-03, 1.15057504138392876e-04, 1.15057504138392876e-04 ]
],
“convergence” : [ true, true, true, true ],
“no_iterations” : [ 3, 6, 4, 2 ],
“convergenceCriteria” : “residual”
}
}
}