@@ -560,6 +560,40 @@ end;
560
560
@test molefractions (ssys. sims[1 ]," H2O" ,1e-3 ) ≈ 0.12732345278036702 rtol= 1e-5
561
561
end ;
562
562
563
+ @testset " Multi-domain Liquid-Film ConstantTV and FragmentBasedConstantTrhoDomain Simulation" begin
564
+ path = " ../src/testing/minimal_fragment_based_film_growth_model.rms"
565
+ phaseDict = readinput (path);
566
+ liqspcs = phaseDict[" liquid" ][" Species" ];
567
+ liqrxns = phaseDict[" liquid" ][" Reactions" ];
568
+ filmspcs = phaseDict[" film" ][" Species" ];
569
+ filmrxns = phaseDict[" film" ][" Reactions" ];
570
+ interfacerxns = phaseDict[Set ([" liquid" ," film" ])][" Reactions" ];
571
+ solvent = phaseDict[" Solvents" ][1 ];
572
+
573
+ liq = IdealDiluteSolution (liqspcs,liqrxns,solvent;name= " liquid" ,diffusionlimited= true );
574
+ film = FragmentBasedIdealFilm (filmspcs,filmrxns;name= " film" ,diffusionlimited= false );
575
+
576
+ initialconds = Dict ([" T" => 298.0 ," V" => 1.0 ," 1,3-BUTADIENE(L)" => 10000.0 ," 2-BUTENE(L)" => 1000.0 ,
577
+ " CYCLOPENTADIENE(L)" => 100.0 ]);
578
+ domainliq,y0liq,pliq = ConstantTVDomain (phase= liq,initialconds= initialconds,constantspecies= [" 1,3-BUTADIENE(L)" ," 2-BUTENE(L)" ," CYCLOPENTADIENE(L)" ]);
579
+
580
+ initialconds = Dict ([" T" => 298.0 , " A" => 1.0 , " rho" => 1.0 , " mass" => 1.0 ,
581
+ " AR" => 0.01 , " KR" => 0.01 , " AH" => 40000.0 , " CDB" => 10000.0 ,
582
+ ]);
583
+ domainfilm,y0film,pfilm = FragmentBasedConstantTrhoDomain (phase= film,initialconds= initialconds);
584
+
585
+ inter,pinter = FragmentBasedReactiveFilmGrowthInterfaceConstantT (domainfilm,domainliq,interfacerxns);
586
+
587
+ react,y0,p = Reactor ((domainfilm,domainliq),(y0film,y0liq),(0.0 ,0.1 ),(inter,),(pfilm,pliq,pinter));
588
+
589
+ sol = solve (react. ode,react. recommendedsolver,abstol= 1e-20 ,reltol= 1e-6 );
590
+
591
+ ssys = SystemSimulation (sol,(domainfilm,domainliq,),(inter,),p);
592
+
593
+ @test concentrations (ssys, " CDB" , 0.05 ) ≈ 10000.322038151966 rtol= 1e-5
594
+ @test concentrations (ssys, " KR" , 0.05 ) ≈ 1.008673416492296e-9 rtol= 1e-5
595
+ end
596
+
563
597
@testset " Test Crash Analysis" begin
564
598
# Define the phase (how species thermodynamic and kinetic properties calculated)
565
599
phaseDict = readinput (" ../src/testing/superminimal_broken.rms" )
0 commit comments