diff --git a/share/microwave_oven/oven.geo b/share/microwave_oven/oven.geo new file mode 100644 index 0000000000000000000000000000000000000000..4d5b980470753b89263db9abb8fcce02f12205e5 --- /dev/null +++ b/share/microwave_oven/oven.geo @@ -0,0 +1,16 @@ +SetFactory("OpenCASCADE"); + +width = 0.30; +height = 0.20; +depth = 0.28; + +wg_width = 0.10; +wg_height = 0.05; + +Box(1) = {0.0, 0.0, 0.0, width, height, depth}; + +Rectangle(100) = { width/2 - wg_width/2, height/2 - wg_height/2, 0 , wg_width, wg_height, 0 }; + +BooleanFragments{ Volume{1}; Delete; }{ Surface{100}; Delete; } + +MeshSize{:} = 0.02; diff --git a/share/microwave_oven/params_oven.lua b/share/microwave_oven/params_oven.lua new file mode 100644 index 0000000000000000000000000000000000000000..1f0459ae7b66c85593c304167ebc73175738f7e4 --- /dev/null +++ b/share/microwave_oven/params_oven.lua @@ -0,0 +1,36 @@ +sim.name = "oven" -- simulation name +sim.dt = 1e-13 -- timestep size +sim.timesteps = 100000 -- num of iterations +sim.gmsh_model = "oven.geo" -- gmsh model filename +sim.use_gpu = 0 -- 0: cpu, 1: gpu +sim.approx_order = 1 -- approximation order +sim.time_integrator = "leapfrog" +postpro.silo_output_rate = 100 -- rate at which to write silo files +postpro.cycle_print_rate = 100 -- console print rate + +postpro["H"].silo_mode = "none" +postpro["J"].silo_mode = "none" + +debug = {} +debug.dump_cell_ranks = true + +materials[1] = {} +materials[1].epsilon = 1 +materials[1].mu = 1 +materials[1].sigma = 0 + +-- ** Boundary conditions ** +local freq = 2.45e9 +function source(tag, x, y, z, t) + local Ex = 0 + local Ey = math.sin((x-0.1)*math.pi/0.1)*math.sin(2*math.pi*t*freq) + local Ez = 0 + return Ex, Ey, Ez +end + +bndconds[100] = {} +bndconds[100].kind = "plane_wave_E" +bndconds[100].source = source + + + diff --git a/share/validation/params_test_maxwell_resonator.lua b/share/validation/params_test_maxwell_resonator.lua index 91b365e7ce7c451c27dae6388153a8caf07ec11f..9e892bc5c3a15d3576bf58735e909ff37efff333 100644 --- a/share/validation/params_test_maxwell_resonator.lua +++ b/share/validation/params_test_maxwell_resonator.lua @@ -4,14 +4,15 @@ --[[ Problem setup ]]-- sim.name = "test_maxwell_resonator" -- simulation name sim.dt = 1e-12 -- timestep size -sim.timesteps = 10001 -- num of iterations +sim.timesteps = 8001 -- num of iterations sim.gmsh_model = "resonator.geo" -- gmsh model filename -sim.use_gpu = 1 -- 0: cpu, 1: gpu -sim.approx_order = 1 -- approximation order +sim.use_gpu = 0 -- 0: cpu, 1: gpu +sim.approx_order = 2 -- approximation order sim.time_integrator = "leapfrog" postpro.silo_output_rate = 100 postpro.cycle_print_rate = 100 -- console print rate +postpro["E"].silo_mode = "zonal" postpro["J"].silo_mode = "none" local epsr = 1 @@ -65,6 +66,6 @@ function ansol(tag, x, y, z, t) end --debug.analytical_solution = ansol - +debug.dump_cell_ranks = true diff --git a/share/validation/resonator.geo b/share/validation/resonator.geo index 3c3f82936d969c3b7a9a80eeb9c048c2b67cbfac..36e1979d5c55aeac965c8c6b51a253800833f545 100644 --- a/share/validation/resonator.geo +++ b/share/validation/resonator.geo @@ -1,4 +1,4 @@ SetFactory("OpenCASCADE"); Box(1) = {0, 0, 0, 1, 0.1, 1}; -MeshSize{:} = 0.05; +MeshSize{:} = 0.04; diff --git a/src/maxwell/maxwell_solver.cpp b/src/maxwell/maxwell_solver.cpp index d99495b9ce0507cf4a16533e3fdea2fd86c048fd..ed39854455a7faa61c42df95df514d20292269ed 100644 --- a/src/maxwell/maxwell_solver.cpp +++ b/src/maxwell/maxwell_solver.cpp @@ -383,7 +383,10 @@ void solver_mainloop(const model& mod, State& state, maxwell::parameter_loader& tc.tic(); } } - std::cout << showcursor << std::endl; + #ifdef USE_MPI + if (proc_rank == 0) + #endif /* USE_MPI */ + std::cout << showcursor << std::endl; } static void