include "../fsem_main_Include.edp"; fsemVERBOSITY = 10; fsemModUseCpp = true; int wF=0; /*************************************************** * Define the mesh. The mesh must be adimentional. * I will try to change that in the future. **************************************************/ real a =0.08; real r1=50e-6/GloScaX; real y1=-60e-6/GloScaY; border topRight(t=r1, a*r1) { x=t; y=0; label=100;} border topLeft(t=a*r1, 0) { x=t; y=0; } border inner(t=0,y1) {x=0; y=t;} border inside(t=0,y1) {x=a*r1; y=t;} border bottomLeft(t=0,a*r1) {x=t; y=y1; label=101;} border bottomRight(t=a*r1, r1) {x=t; y=y1; label=101;} border outer(t=y1, 0) {x=r1; y=t;} // The meshed domain is at the left hand side of the border GloMesh = buildmesh(topRight(20) + topLeft(20) + outer(20) + bottomLeft(20) + bottomRight(20) + inner(100) + inside(100) ); /* Contact is not mandatory for harmonic calculation. */ //GloTempContactLabel[1] = 101; GloTempContactTc[1] = 0; /* set temperature of thermal contact */ /************************* * Define doping profile *************************/ ParUsrNDOP = 0.0; ParUsrPDOP = 1e18 * ConvC2M^(-3); /******************* * Define laser(s) *******************/ ParUsrLaserN = 1; /* number of lasers */ ParUsrLaserE[0] = 1.24 / 0.980; /* energy [eV] */ ParUsrLaserI[0] = 0.806e6 * ConvC2M^(-2); /* Irradiance [W m-2] */ ParUsrLaserRefl[0] = 0.303; /* Reflectance [adim] */ ParUsrLaserR[0] = 1.5 * ConvU2M; /* Radius [m] */ /****************************************** * Solve the nonlinear steady problem *****************************************/ ModUsrRecAuger=1; ModUsrRecSRH=1; ModUsrRecSRHConcDepLifeTime=1; ModUsrOptCarrGen=1; // switch on optical carrier generation ModUsrDiffAmbi = ModCSTDiffAmbiCst; // switch on constant diffusivity ModUsrBTBIP=1; // Band-to-band absorption model (Smith) ParMatxyzTAUN0 = 2e-3; ParMatxyzTAUP0 = 2e-4; ParMatxyzNSRH = 5e16 * ConvC2M^(-3); ParMatxyzPSRH = 5e16 * ConvC2M^(-3); GloVarSemiEXC = 1e15 * ConvC2M^(-3); // use this as initial guess SolveCarrNonlinearSteady(); /************ * Plots ***********/ // Plot Carrier related properties plot(GloVarSemiCARRGEN[0], wait=wF, value=true); // the carrier generation by laser 1 plot(GloVarSemiEXC, wait=wF, value=true); // the solution (excess carrier [m-3]) GloSaveGmshPosSPARSEDST(GloMesh, GloVarSemiCARRGEN[0], ConvM2C^(-3), "GloVarSemiCARRGEN[0]", "GloVarSemiCARRGEN.pos", 1e6, GloScaX, GloScaY); GloSaveGmshPosSPARSEDST(GloMesh, GloVarSemiEXC, ConvM2C^(-3), "GloVarSemiEXC", "GloVarSemiEXC.pos", 1e6, GloScaX, GloScaY); /****************************************** * Solve steady periodic temperature ******************************************/ ModUsrHeatConductivityCst = 1; ModUsrHeatRhoCpCst = 1; /* Specify heat source by a user defined function */ ModUsrHeatHotCarrier = 1; ModUsrHeatRec = 1; ParUsrLaserModFreq = 1e5; // Hz SolveTempLinearSteadyPeriodic(); // Plot Temperature related properties GloVhP1 TempReal; GloVhP1 TempImag ; TempReal = real(GloVarTempTc); TempImag = imag(GloVarTempTc); plot(GloMesh, TempReal, wait=wF, value=true); plot(GloMesh, TempImag, wait=wF, value=true); GloSaveGmshPosSPARSEDST(GloMesh, TempReal, 1, "TempReal", "TempReal.pos", 1e6, GloScaX, GloScaY); GloSaveGmshPosSPARSEDST(GloMesh, TempImag, 1, "TempImag", "TempImag.pos", 1e6, GloScaX, GloScaY); /********************************* * Test (for debugging purpose) *********************************/ x=0;y=0; real GloVarTempT00r = real(GloVarTempTc); real GloVarTempT00i = imag(GloVarTempTc); real GloVarTempT00savedr = 0.1454255054; real GloVarTempT00savedi = -0.07772457603; real eps = abs(GloVarTempT00savedi) * 1e-3; cout << "GloVarTempT00r: " << GloVarTempT00r << endl; cout << "GloVarTempT00i: " << GloVarTempT00i << endl; if(GloVarTempT00r > GloVarTempT00savedr-eps && GloVarTempT00r < GloVarTempT00savedr+eps && GloVarTempT00i > GloVarTempT00savedi-eps && GloVarTempT00i < GloVarTempT00savedi+eps) { cout << endl << "*** 004a: Test successfully passed ! ***" << endl; } else { cout << endl << "*** ERROR: expected value is: " << GloVarTempT00savedr << ", " << GloVarTempT00savedi << endl; exit(0); }