Skip to content

Commit

Permalink
diffusion test inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tobin-ford committed Aug 13, 2024
1 parent b55ca06 commit 8bae5e6
Show file tree
Hide file tree
Showing 3 changed files with 151 additions and 0 deletions.
101 changes: 101 additions & 0 deletions tests/data/diffusion_2d_input.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
,Sample Temperature,Back Encapsulant Moisture
0 days 00:00:00,25.0,9.593506521235106e-05
0 days 00:01:00,25.39892591849739,9.58089271845125e-05
0 days 00:02:00,26.133086999842654,9.596766418022288e-05
0 days 00:03:00,27.146512737253207,9.644239907926973e-05
0 days 00:04:00,28.390111182536653,9.725434547810154e-05
0 days 00:05:00,29.820914254725757,9.841461544521726e-05
0 days 00:06:00,31.401401323486052,9.99249371078692e-05
0 days 00:07:00,33.09889320207432,0.00010177893699913063
0 days 00:08:00,34.885009459955384,0.00010396368681475106
0 days 00:09:00,36.73518266499959,0.00010646128991504086
0 days 00:10:00,38.628223796781974,0.00010925036093876652
0 days 00:11:00,40.545933642482176,0.00011230731758673512
0 days 00:12:00,42.4727555012041,0.00011560745211488278
0 days 00:13:00,44.395464986583235,0.00011912578206560222
0 days 00:14:00,46.3028931361978,0.00012283769842096957
0 days 00:15:00,48.185679413947234,0.00012671943838488166
0 days 00:16:00,50.03605153218519,0.0001307484126945543
0 days 00:17:00,51.847629327586986,0.00013490341628739393
0 days 00:18:00,53.61525020174062,0.00013916474811390413
0 days 00:19:00,55.33481388720944,0.00014351426206668787
0 days 00:20:00,57.00314452497401,0.0001479353670938655
0 days 00:21:00,58.617868242115286,0.00015241299096158112
0 days 00:22:00,60.177304601513896,0.00015693351899515308
0 days 00:23:00,61.680370460165676,0.00016148471650731115
0 days 00:24:00,63.12649492121657,0.0001660556414918659
0 days 00:25:00,64.51554419859495,0.0001706365524664841
0 days 00:26:00,65.84775533360644,0.0001752188150222039
0 days 00:27:00,67.12367781135583,0.00017979480961370983
0 days 00:28:00,68.34412222254703,0.00018435784234338814
0 days 00:29:00,69.51011520414583,0.000188902059902653
0 days 00:30:00,70.62285997152905,0.00019342236939371105
0 days 00:31:00,71.68370182595137,0.00019791436342978997
0 days 00:32:00,72.69409808521978,0.00020237425067492538
0 days 00:33:00,73.65559194307724,0.0002067987918145924
0 days 00:34:00,74.56978981460053,0.00021118524082943297
0 days 00:35:00,75.43834177148378,0.00021553129136348017
0 days 00:36:00,76.2629247129289,0.00021983502792596318
0 days 00:37:00,77.04522795546279,0.00022409488163462342
0 days 00:38:00,77.78694095877181,0.00022830959019287195
0 days 00:39:00,78.48974293496639,0.00023247816178880343
0 days 00:40:00,79.1552941159061,0.00023659984260782262
0 days 00:41:00,79.7852284776378,0.00024067408765999078
0 days 00:42:00,80.38114774290584,0.00024470053463632706
0 days 00:43:00,80.9446165023355,0.000248678980523818
0 days 00:44:00,81.47715831249569,0.0002526093607257803
0 days 00:45:00,81.98025264481946,0.00025649173045172647
0 days 00:46:00,82.45533257348576,0.0002603262481584548
0 days 00:47:00,82.90378310300844,0.0002641131608413236
0 days 00:48:00,83.3269400475898,0.00026785279099131667
0 days 00:49:00,83.72608938441084,0.0002715455250493652
0 days 00:50:00,84.1024670120689,0.0002751918032043531
0 days 00:51:00,84.45725885344804,0.00027879211039524425
0 days 00:52:00,84.79160124951395,0.00028234696839078504
0 days 00:53:00,85.10658159695431,0.0002858569288322861
0 days 00:54:00,85.40323918831653,0.00028932256713606555
0 days 00:55:00,85.68256621839954,0.0002927444771623028
0 days 00:56:00,85.94550892520012,0.0002961232665663447
0 days 00:57:00,86.19296883775475,0.0002994595527569611
0 days 00:58:00,86.4258041068083,0.00030275395939375005
0 days 00:59:00,86.64483089742723,0.00030600711336286625
0 days 01:00:00,86.85082482550078,0.000309219642176565
0 days 01:01:00,87.04452242257649,0.00031239217174776427
0 days 01:02:00,87.22662261568973,0.00031552532449597847
0 days 01:03:00,87.39778821080338,0.0003186197177456249
0 days 01:04:00,87.55864737019911,0.000321675962381878
0 days 01:05:00,87.70979507568147,0.00032469466173301137
0 days 01:06:00,87.85179457079268,0.00032767641065154093
0 days 01:07:00,87.98517877640906,0.0003306217947695159
0 days 01:08:00,88.11045167511743,0.00033353138990602037
0 days 01:09:00,88.22808966066813,0.0003364057616073853
0 days 01:10:00,88.33854284958379,0.0003392454648027966
0 days 01:11:00,88.44223635268408,0.00034205104355992916
0 days 01:12:00,88.53957150487616,0.00034482303092699416
0 days 01:13:00,88.63092705207032,0.0003475619488491389
0 days 01:14:00,88.7166602945182,0.00035026830814853765
0 days 01:15:00,88.79710818624679,0.00035294260855876
0 days 01:16:00,88.8725883905803,0.00035558533880510567
0 days 01:17:00,88.94340029201368,0.0003581969767235966
0 days 01:18:00,89.00982596492783,0.00036077798941219156
0 days 01:19:00,89.07213109982726,0.0003633288334085791
0 days 01:20:00,89.13056588793643,0.0003658499548896053
0 days 01:21:00,89.18536586511836,0.00036834178988801047
0 days 01:22:00,89.23675271618107,0.0003708047645227105
0 days 01:23:00,89.2849350407167,0.0003732392952393396
0 days 01:24:00,89.33010908167836,0.00037564578905821685
0 days 01:25:00,89.37245941794393,0.0003780246438272785
0 days 01:26:00,89.4121596221448,0.0003803762484778627
0 days 01:27:00,89.44937288505473,0.00038270098328153576
0 days 01:28:00,89.48425260784045,0.0003849992201064162
0 days 01:29:00,89.51694296347289,0.00038727132267168794
0 days 01:30:00,89.54757942858797,0.00038951764679920266
0 days 01:31:00,89.57628928706924,0.00039173854066125376
0 days 01:32:00,89.60319210660298,0.00039393434502376387
0 days 01:33:00,89.62840018943001,0.00039610539348427
0 days 01:34:00,89.65201899848947,0.00039825201270421125
0 days 01:35:00,89.67414756011655,0.0004003745226351344
0 days 01:36:00,89.69487884442238,0.0004024732367385207
0 days 01:37:00,89.71430012444758,0.0004045484621990259
0 days 01:38:00,89.73249331514396,0.00040660050013098493
0 days 01:39:00,89.74953529320067,0.00040862964577810464
Binary file added tests/data/diffusion_2d_result.npy
Binary file not shown.
50 changes: 50 additions & 0 deletions tests/sandbox.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,56 @@
"source": [
"test_psat()"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
"import pvdeg\n",
"from pvdeg import TEST_DATA_DIR\n",
"import os\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {},
"outputs": [],
"source": [
"sample_df = pd.read_csv(os.path.join(TEST_DATA_DIR, \"diffusion_2d_input.csv\"), index_col=0)\n",
"\n",
"sample_df.index = pd.to_timedelta(sample_df.index)\n",
"sample_df.index = sample_df.index.values.astype(\"timedelta64[s]\")"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [],
"source": [
"res = pvdeg.diffusion.module_front(\n",
" time_index=sample_df.index,\n",
" backsheet_moisture=sample_df[\"Back Encapsulant Moisture\"],\n",
" sample_temperature=sample_df[\"Sample Temperature\"],\n",
" p=0.1,\n",
" CW=15.6,\n",
" nodes=20,\n",
" eva_diffusivity_ea=0.395292897,\n",
" Dif=2.31097881676966,\n",
" n_steps=20,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit 8bae5e6

Please sign in to comment.