Skip to content

Commit 79f2bd9

Browse files
committed
tests compile, but only 69% of the tests pass
1 parent 9b1c171 commit 79f2bd9

30 files changed

Lines changed: 5807 additions & 1440 deletions

src/common/material_library.cpp

Lines changed: 833 additions & 339 deletions
Large diffs are not rendered by default.

src/common/material_library.hpp

Lines changed: 3 additions & 336 deletions
Original file line numberDiff line numberDiff line change
@@ -6,342 +6,9 @@
66
namespace miso
77
{
88
/// Defines the material library for for miso
9-
///
10-
/// This is placed in a hpp file instead of a json file so that it can be
11-
/// compiled in and doesn't require a path to it. This also allows comments.
12-
nlohmann::json material_library{
13-
{"box1",
14-
{
15-
{"rho", 1},
16-
{"cv", 1},
17-
{"kappa", 1},
18-
{"kappae", 1},
19-
{"sigma", -1},
20-
{"kh", -0.00013333333333333},
21-
{"ke", -3.55555555555e-8},
22-
{"alpha", 1.0},
23-
{"max-temp", 0.5},
24-
// {"mu_r", 1.0} // for real scaled problem
25-
{"mu_r", 1 / (4 * M_PI * 1e-7)} // for unit scaled problem
26-
27-
}},
28-
{"box2",
29-
{
30-
{"rho", 1},
31-
{"cv", 1},
32-
{"kappa", 1},
33-
{"kappae", 1},
34-
{"sigma", -1},
35-
{"kh", -0.00013333333333333},
36-
{"ke", -3.55555555555e-8},
37-
{"alpha", 1.0},
38-
{"max-temp", 0.5},
39-
// {"mu_r", 1.0} // for real scaled problem
40-
{"mu_r", 1 / (4 * M_PI * 1e-7)} // for unit scaled problem
41-
}},
42-
{"testmat",
43-
{
44-
{"mu_r", 1},
45-
{"rho", 1},
46-
{"cv", 1},
47-
{"kappa", 1},
48-
{"kappae", 1},
49-
{"sigma", -1},
50-
{"kh", -0.00013333333333333},
51-
{"ke", -3.55555555555e-8},
52-
{"alpha", 1.0},
53-
}},
54-
{"regtestmat1",
55-
{
56-
{"mu_r", 1},
57-
{"rho", 1},
58-
{"cv", 1},
59-
{"kappa", 1},
60-
{"kappae", 1},
61-
{"sigma", -1},
62-
}},
63-
{"regtestmat2",
64-
{
65-
{"mu_r", 1},
66-
{"rho", 1},
67-
{"cv", 1},
68-
{"kappa", 1},
69-
{"kappae", 1},
70-
{"sigma", 1},
71-
}},
72-
{"ideal",
73-
{{"mu_r", 1e8},
74-
{"rho", 8120.0},
75-
{"cv", 0.420},
76-
{"kappa", 20},
77-
// {"kh", 0.02},
78-
// {"ke", 0.0001},
79-
{"ks", 0.0044},
80-
{"beta", 1.76835},
81-
{"alpha", 1.286}}},
82-
{"hiperco50",
83-
{{"B",
84-
{0.0,
85-
0.0,
86-
0.0,
87-
0.0,
88-
1.424590497285806,
89-
1.879802197738017,
90-
2.089177970766961,
91-
2.184851867536579,
92-
2.229448683,
93-
2.264761102805212,
94-
2.302883806114454,
95-
7.290145827,
96-
7.290145827,
97-
7.290145827,
98-
7.290145827}},
99-
{"H",
100-
{0.0,
101-
8.993187962999999,
102-
10.978287105,
103-
83.247282676,
104-
211.230768762,
105-
458.336047457,
106-
1159.131573849,
107-
2773.494054824,
108-
1.342303920594017e6,
109-
2.675328620250853e6,
110-
3.9982409587815357e6}},
111-
{"mu_r", 750},
112-
{"rho", 8120.0},
113-
{"cv", 0.420},
114-
{"kappa", 20},
115-
// {"kh", 0.02},
116-
// {"ke", 0.0001},
117-
{"ks", 0.0044},
118-
{"beta", 1.76835},
119-
{"alpha", 1.286}}},
120-
{"ansys-steel",
121-
{
122-
{"mu_r", 10000},
123-
}},
124-
{"steel",
125-
{{"B", {0.0000000000000000, 0.0044450000000000, 0.0058190000000000,
126-
0.0071930000000000, 0.0085680000000000, 0.0128980000000000,
127-
0.0172280000000000, 0.0274700000000000, 0.0465790000000000,
128-
0.0922889999999999, 0.2207600000000000, 0.4113000000000000,
129-
0.6018500000000000, 0.7717000000000000, 0.9149500000000000,
130-
1.0464000000000000, 1.1600999999999900, 1.2619000000000000,
131-
1.3431000000000000, 1.3947000000000000, 1.4286000000000000,
132-
1.4507000000000000, 1.4668000000000000, 1.4830000000000000,
133-
1.4932000000000000, 1.5064000000000000, 1.5166999999999900,
134-
1.5268999999999900, 1.5371999999999900, 1.5474000000000000,
135-
1.5576000000000000, 1.5679000000000000, 1.5840000000000000,
136-
1.5972000000000000, 1.6104000000000000, 1.6266000000000000,
137-
1.6427000000000000, 1.6589000000000000, 1.6779999999999900,
138-
1.6971000000000000, 1.7161999999999900, 1.7353000000000000,
139-
1.7604000000000000, 1.7854000000000000, 1.8104000000000000,
140-
1.8384000000000000, 1.8723000000000000, 1.9060999999999900,
141-
1.9459000000000000, 1.9886999999999900, 2.0344000000000000,
142-
2.0741999999999900, 2.1080999999999900, 2.1389999999999900,
143-
2.1610999999999900, 2.1772000000000000, 2.1903999999999900}},
144-
{"H", {0.0000000000000000, 9.5103069999999900,
145-
11.2124700000000000, 13.2194140000000000,
146-
15.5852530000000000, 18.3712620000000000,
147-
21.6562209999999000, 25.5213000000000000,
148-
30.0619920000000000, 35.3642410000000000,
149-
41.4304339999999000, 48.3863029999999000,
150-
56.5103700000000000, 66.0660359999999000,
151-
77.3405759999999000, 90.5910259999999000,
152-
106.2120890000000000, 124.5944920000000000,
153-
146.3111910000000000, 172.0624699999990000,
154-
202.5247369999990000, 238.5255980000000000,
155-
281.0120259999990000, 331.0583149999990000,
156-
390.1446090000000000, 459.6953439999990000,
157-
541.7317890000000000, 638.4104939999990000,
158-
752.3336430000000000, 886.5729270000000000,
159-
1044.7729970000000000, 1231.2230800000000000,
160-
1450.5386699999900000, 1709.1655450000000000,
161-
2013.8677920000000000, 2372.5235849999900000,
162-
2795.1596880000000000, 3292.9965269999900000,
163-
3878.9256599999900000, 4569.1013169999900000,
164-
5382.0650580000000000, 6339.7006929999900000,
165-
7465.5631620000000000, 8791.7222000000000000,
166-
10352.2369750000000000, 12188.8856750000000000,
167-
14347.8232499999000000, 16887.9370500000000000,
168-
19872.0933000000000000, 23380.6652749999000000,
169-
27504.3713250000000000, 32364.9650250000000000,
170-
38095.3407999999000000, 44847.4916749999000000,
171-
52819.5656250000000000, 62227.2176750000000000,
172-
73321.1169499999000000}},
173-
{"mu_r", 750},
174-
{"rho", 7.750},
175-
{"cv", 0.420},
176-
{"kappa", 50},
177-
// {"kh", 0.02},
178-
// {"ke", 0.0001},
179-
{"ks", 0.0044},
180-
{"beta", 1.76835},
181-
{"alpha", 1.286}}},
182-
{"team13",
183-
{
184-
{"B",
185-
{// 0.0, 0.0, 0.0, 0.0, 0.1,
186-
// 0.4672, 1.1862, 1.4124, 1.6386, 4.3078, 15.8322, 15.8322,
187-
// 15.8322, 15.8322 0, 0.025, 0.3,
188-
// 0.7, 1.1, 1.5, 1.7, 1.8
189-
0.0,
190-
0.0,
191-
0.0,
192-
0.0,
193-
0.0979,
194-
1.3841,
195-
1.800000001641453,
196-
1.999999999999916,
197-
2.22,
198-
2.22,
199-
2.22,
200-
2.22}},
201-
{"H",
202-
{// 8.768456660138328, 7.962589775712834, 6.836102567668674,
203-
// 5.849726164223915,
204-
// 5.817004866729157, 5.925084803960186, 12.847141274392365,
205-
// 13.168983405092462,
206-
// 13.587072660625301, 13.587072660625301 0.0, 93,
207-
// 222, 272, 377, 933, 4993, 9423
208-
0.0,
209-
164.46362274610001,
210-
301.3546318106,
211-
161.7681804384,
212-
961.7045565209,
213-
27015.6213073554,
214-
138424.0810362731,
215-
196780.8935033237}},
216-
{"mu_r", 750}
217-
// {"B",
218-
// {
219-
// 0,
220-
// 0.0025,
221-
// 0.005,
222-
// 0.0125,
223-
// 0.025,
224-
// 0.05,
225-
// 0.1,
226-
// 0.2,
227-
// 0.3,
228-
// 0.4,
229-
// 0.5,
230-
// 0.6,
231-
// 0.7,
232-
// 0.8,
233-
// 0.9,
234-
// 1.0,
235-
// 1.1,
236-
// 1.2,
237-
// 1.3,
238-
// 1.4,
239-
// 1.5,
240-
// 1.55,
241-
// 1.6,
242-
// 1.65,
243-
// 1.7,
244-
// 1.75,
245-
// 1.8,
246-
// 1.8435526351982585,
247-
// 1.9179901552741234,
248-
// 1.984275166575515,
249-
// 2.042407669102433,
250-
// 2.092387662854877,
251-
// 2.1342151478328484,
252-
// 2.1678901240363464,
253-
// 2.1934125914653704,
254-
// 2.210782550119921,
255-
// 2.219999999999999,
256-
// 2.222831853071796,
257-
// 2.2605309649148735,
258-
// 2.298230076757951,
259-
// 2.3359291886010287,
260-
// 2.373628300444106
261-
// }},
262-
// {"H",
263-
// {
264-
// 0.0,
265-
// 16,
266-
// 30,
267-
// 54,
268-
// 93,
269-
// 143,
270-
// 191,
271-
// 210,
272-
// 222,
273-
// 233,
274-
// 247,
275-
// 258,
276-
// 272,
277-
// 289,
278-
// 313,
279-
// 342,
280-
// 377,
281-
// 433,
282-
// 509,
283-
// 648,
284-
// 933,
285-
// 1228,
286-
// 1934,
287-
// 2913,
288-
// 4993,
289-
// 7189,
290-
// 9423,
291-
// 11657.0,
292-
// 15794.62323416157,
293-
// 19932.24646832314,
294-
// 24069.869702484713,
295-
// 28207.492936646286,
296-
// 32345.116170807854,
297-
// 36482.73940496943,
298-
// 40620.362639130995,
299-
// 44757.98587329257,
300-
// 48895.60910745414,
301-
// 50000.0,
302-
// 80000.0,
303-
// 110000.0,
304-
// 140000.0,
305-
// 170000.0
306-
// }}
307-
}},
308-
{"Nd2Fe14B",
309-
{{"mu_r", 1.04},
310-
{"B_r", 1.390},
311-
// {"B_r", 0.0},
312-
{"rho", 7500},
313-
{"cv", 502.08},
314-
{"kappa", 9},
315-
{"max-temp", 310 + 273.15}, // Curie temp is 310 C
316-
// {"ks", 18.092347463670936},
317-
{"ks", 500},
318-
{"beta", 0.0},
319-
{"alpha", 0.0}}},
320-
{"air",
321-
{{"mu_r", 1},
322-
{"rho", 1.225},
323-
{"cv", 93},
324-
{"kappa", 0.026},
325-
{"max-temp", 500}}},
326-
{"copper", // this is meant for the heatsink
327-
{
328-
{"mu_r", 1},
329-
{"rho", 8960},
330-
{"cv", 376},
331-
{"kappa", 400}
332-
// {"sigma", 58.14e6},
333-
}},
334-
{"2024-T3", // motor heatsink from Reference Paper
335-
{{"mu_r", 1}, {"rho", 2780}, {"cv", 875}, {"kappa", 120}}},
336-
{"copperwire", // meant for windings - should have reduced
337-
// conductivity
338-
{{"mu_r", 1},
339-
{"rho", 8960},
340-
{"cv", 376},
341-
// {"kappa", 237.6},
342-
{"kappa", 2.49},
343-
{"sigma", 58.14e6},
344-
{"max-temp", 400}}}};
9+
/// Declared extern and defined in default_options.cpp so that executables can
10+
/// `#include "miso.hpp"` and avoid a duplicate symbol linking error
11+
extern const nlohmann::json material_library;
34512

34613
} // namespace miso
34714

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
#ifndef MISO_FLUIDFLOW
22
#define MISO_FLUIDFLOW
33

4-
#include "advection.hpp"
54
#include "euler_fluxes.hpp"
65
#include "euler_integ.hpp"
76
#include "euler_sens_integ.hpp"
8-
#include "euler.hpp"
97
#include "flow_control_solver.hpp"
108
#include "flow_solver.hpp"
119
#include "inviscid_integ.hpp"
1210
#include "mesh_sens_integ.hpp"
1311
#include "mms_integ.hpp"
1412
#include "navier_stokes_fluxes.hpp"
1513
#include "navier_stokes_integ.hpp"
16-
#include "navier_stokes.hpp"
1714
#include "viscous_integ.hpp"
1815

1916
#endif

src/physics/physics.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
#include "electromagnetics/electromagnetics.hpp"
55
#include "fluidflow/fluidflow.hpp"
66
#include "thermal/thermal.hpp"
7-
#include "joule/joule.hpp"
87
#include "diag_mass_integ.hpp"
98
#include "miso_input.hpp"
109
#include "miso_integrator.hpp"
11-
#include "solver.hpp"
1210

1311
#endif

src/physics/thermal/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
set(MISO_PHYSICS_THERMAL_HEADERS
2+
temp_integ.hpp
23
thermal_integ.hpp
34
thermal_residual.hpp
45
thermal.hpp
56
)
67

78
target_sources(miso
89
PRIVATE
10+
temp_integ.hpp
911
thermal_integ.cpp
1012
thermal_residual.cpp
1113
thermal.cpp

0 commit comments

Comments
 (0)