diff --git a/proceedings_paper_example/1D-Periodic/README.md b/papers/maxwells_proceedings_paper/1D-Periodic/README.md similarity index 100% rename from proceedings_paper_example/1D-Periodic/README.md rename to papers/maxwells_proceedings_paper/1D-Periodic/README.md diff --git a/proceedings_paper_example/1D-Periodic/input.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_forward.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_forward.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_forward.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_forward.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_functions.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_functions.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_functions.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_functions.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_functions_forward.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_functions_forward.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_functions_forward.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_functions_forward.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_mesh.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_mesh.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_mesh.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_mesh.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_params.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_params.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_params.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_params.yaml diff --git a/proceedings_paper_example/1D-Periodic/input_rol2.yaml b/papers/maxwells_proceedings_paper/1D-Periodic/input_rol2.yaml similarity index 100% rename from proceedings_paper_example/1D-Periodic/input_rol2.yaml rename to papers/maxwells_proceedings_paper/1D-Periodic/input_rol2.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/README.md b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/README.md similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/README.md rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/README.md diff --git a/proceedings_paper_example/2_5D-Thunderbird/input.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/input_forward.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_forward.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input_forward.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_forward.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/input_functions.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_functions.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input_functions.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_functions.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/input_functions_forward.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_functions_forward.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input_functions_forward.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_functions_forward.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/input_params.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_params.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input_params.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_params.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/input_rol2.yaml b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_rol2.yaml similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/input_rol2.yaml rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/input_rol2.yaml diff --git a/proceedings_paper_example/2_5D-Thunderbird/mesh/decompose_exodus_script b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/mesh/decompose_exodus_script similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/mesh/decompose_exodus_script rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/mesh/decompose_exodus_script diff --git a/proceedings_paper_example/2_5D-Thunderbird/mesh/thunderbird-2.5d.jou b/papers/maxwells_proceedings_paper/2_5D-Thunderbird/mesh/thunderbird-2.5d.jou similarity index 100% rename from proceedings_paper_example/2_5D-Thunderbird/mesh/thunderbird-2.5d.jou rename to papers/maxwells_proceedings_paper/2_5D-Thunderbird/mesh/thunderbird-2.5d.jou diff --git a/proceedings_paper_example/README.md b/papers/maxwells_proceedings_paper/README.md similarity index 100% rename from proceedings_paper_example/README.md rename to papers/maxwells_proceedings_paper/README.md diff --git a/papers/maxwells_source_cloaking_paper/1D-Example/input.yaml b/papers/maxwells_source_cloaking_paper/1D-Example/input.yaml new file mode 100644 index 00000000..12eae902 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/1D-Example/input.yaml @@ -0,0 +1,114 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 0 + Mesh input file: input_mesh.yaml + Physics: + modules: maxwell + active controls: true + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + scalar data: false + Ex: + back: '0.0' + front: '0.0' + Ey: + back: '0.0' + front: '0.0' + Ez: + back: '0.0' + front: '0.0' + Mass weights: + E: 1.0 + B: 1.0 + Norm weights: + E: permittivity + B: 1/permeability + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Parameters input file: input_params.yaml + Functions input file: input_functions.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-14 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + dump jacobian: false + Analysis input file: input_rol2.yaml + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 1 + output file: opt-output/output + compute objective: true + compute response: false + compute weighted norm: false + compute sensitivities: false + Objective functions: + EM Energy: + type: integrated control + function: '0.5*permittivity*((E[x])^2+(E[y])^2+(E[z])^2) + 0.5/permeability*((B[x])^2+(B[y])^2+(B[z])^2)' + weight: 1.0e35 + blocks: 'eblock-0_0_0 eblock-0_0_1 eblock-0_0_2 eblock-0_0_6 eblock-0_0_7 eblock-0_0_8' + RegObj: + type: integrated control + function: '0.0' + weight: 0.0 + blocks: 'eblock-0_0_3 eblock-0_0_5' + Regularization functions: + l2reg: + type: integrated + location: volume + function: '0.5*(ctrl_current[x]*ctrl_current[x])+0.5*(ctrl_current[y]*ctrl_current[y])+0.5*(ctrl_current[z]*ctrl_current[z])' + weight: 1.0e5 + curlreg: + type: integrated + location: volume + function: '0.5*(curl(ctrl_current)[x]*curl(ctrl_current)[x])+0.5*(curl(ctrl_current)[y]*curl(ctrl_current)[y])+0.5*(curl(ctrl_current)[z]*curl(ctrl_current)[z])' + weight: 1.0e5 + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + ctrlJx: 'curl(ctrl_current)[x]' + ctrlJy: 'curl(ctrl_current)[y]' + ctrlJz: 'curl(ctrl_current)[z]' + conductivity: sigma + em_energy: '1.0e35 * (0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' + +... diff --git a/papers/maxwells_source_cloaking_paper/1D-Example/input_forward.yaml b/papers/maxwells_source_cloaking_paper/1D-Example/input_forward.yaml new file mode 100644 index 00000000..23badad0 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/1D-Example/input_forward.yaml @@ -0,0 +1,78 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 10 + Mesh input file: input_mesh.yaml + Physics: + modules: maxwell + active controls: true + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + scalar data: false + Ex: + back: '0.0' + front: '0.0' + Ey: + back: '0.0' + front: '0.0' + Ez: + back: '0.0' + front: '0.0' + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Functions input file: input_functions_forward.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-14 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + Analysis: + analysis type: forward + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 1 + output file: forward-output-44/forward_output + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + conductivity: sigma + em_energy: '1.0e35 * (0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' + +... diff --git a/papers/maxwells_source_cloaking_paper/1D-Example/input_functions.yaml b/papers/maxwells_source_cloaking_paper/1D-Example/input_functions.yaml new file mode 100644 index 00000000..e6c51386 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/1D-Example/input_functions.yaml @@ -0,0 +1,101 @@ +%YAML 1.1 +--- +ANONYMOUS: + Functions: + # center block where current starts from + eblock-0_0_4: + current x: 'gt*exp(-2*timebub*(tzmin)' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + fc: '75.0e12' + fb: '40.0e12' + bs: '2.3548' + sigmaJ: fb/bs + gt: 'cos(2*pi*fc*(t-toff))' + timebub: '(pi*sigmaJ*(t-toff))*(pi*sigmaJ*(t-toff))' + toff: '50.0e-15' + zmin: '-0.404e-6' + zmax: '0.404e-6' + + # control blocks (NB: the parameters are not defined nor used in the forward problem) + eblock-0_0_3: + current x: 'curl(ctrl_current)[x]' + current y: 'curl(ctrl_current)[y]' + current z: 'curl(ctrl_current)[z]' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + eblock-0_0_5: + current x: 'curl(ctrl_current)[x]' + current y: 'curl(ctrl_current)[y]' + current z: 'curl(ctrl_current)[z]' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + + # end blocks where adiabatic absorption occurs + eblock-0_0_0: + current x: '0' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + conductivity: 'alpha*zmindist*zmincut + alpha*zmaxdist*zmaxcut' + alpha: 'max_sigma/(abs(zmaxend-zmaxstart)^3)' + max_sigma: "1.0e4" + zmaxd: 'abs(z-zmaxstart)' + zmaxdist: 'zmaxd*zmaxd*zmaxd' + zmaxcut: '(z>zmaxstart)' + zmaxstart: '32.0e-6' + zmaxend: '40.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(zzmaxstart)' + zmaxstart: '32.0e-6' + zmaxend: '40.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(zzmin)' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + fc: '75.0e12' + fb: '40.0e12' + bs: '2.3548' + sigmaJ: fb/bs + gt: 'cos(2*pi*fc*(t-toff))' + timebub: '(pi*sigmaJ*(t-toff))*(pi*sigmaJ*(t-toff))' + toff: '50.0e-15' + zmin: '-0.404e-6' + zmax: '0.404e-6' + + # control blocks (NB: the parameters are not defined nor used in the forward problem) + eblock-0_0_3: + current x: '0' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + eblock-0_0_5: + current x: '0' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + + # end blocks where adiabatic absorption occurs + eblock-0_0_0: + current x: '0' + current y: '0' + current z: '0' + permittivity: '8.854187817e-12' + permeability: '1.2566370614e-6' + conductivity: 'alpha*zmindist*zmincut + alpha*zmaxdist*zmaxcut' + alpha: 'max_sigma/(abs(zmaxend-zmaxstart)^3)' + max_sigma: "1.0e4" + zmaxd: 'abs(z-zmaxstart)' + zmaxdist: 'zmaxd*zmaxd*zmaxd' + zmaxcut: '(z>zmaxstart)' + zmaxstart: '32.0e-6' + zmaxend: '40.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(zzmaxstart)' + zmaxstart: '32.0e-6' + zmaxend: '40.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(z 35.9 or x_coord < -35.9 or y_coord > 35.9 or y_coord < -35.9 +sideset 3 remove surface with z_coord > 1.9 +sideset 3 remove surface with z_coord < 0.1 +sideset 3 name 'pec' + +block all element type HEX8 + +# volume all scale {unitscaling} + +export mesh "thunderbird-2.5d.exo" dimension 3 overwrite \ No newline at end of file diff --git a/papers/maxwells_source_cloaking_paper/2D-Example/input.yaml b/papers/maxwells_source_cloaking_paper/2D-Example/input.yaml new file mode 100644 index 00000000..e224753c --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/2D-Example/input.yaml @@ -0,0 +1,114 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 0 + Mesh: + dimension: 3 + source: Exodus + mesh file: mesh/thunderbird-2.5d-scaled.exo + element type: hex + Periodic BCs: + Count: 1 + Periodic Condition 1: 'xy-all 1e-10: top;bottom' + Physics: + modules: maxwell + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + Ex: + pec: '0.0' + Ey: + pec: '0.0' + Ez: + pec: '0.0' + Mass weights: + E: 1.0 + B: 1.0 + Norm weights: + E: permittivity + B: 1/permeability + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Parameters input file: input_params.yaml + Functions input file: input_functions.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-8 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + Analysis input file: input_rol2.yaml + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 1 + output file: opt-output/output + compute objective: true + compute response: false + compute weighted norm: false + compute sensitivities: false + Objective functions: + EM Energy: + type: integrated control + function: '0.5*permittivity*((E[x])^2+(E[y])^2+(E[z])^2) + 0.5/permeability*((B[x])^2+(B[y])^2+(B[z])^2)' + weight: 1.0e35 + blocks: 'observation' + RegObj: + type: integrated control + function: '0.0' + weight: 0.0 + blocks: 'control' + Regularization functions: + l2reg: + type: integrated + location: volume + function: '0.5*(ctrl_current[x]*ctrl_current[x])+0.5*(ctrl_current[y]*ctrl_current[y])+0.5*(ctrl_current[z]*ctrl_current[z])' + weight: 1.0e5 + curlreg: + type: integrated + location: volume + function: '0.5*(curl(ctrl_current)[x]*curl(ctrl_current)[x])+0.5*(curl(ctrl_current)[y]*curl(ctrl_current)[y])+0.5*(curl(ctrl_current)[z]*curl(ctrl_current)[z])' + weight: 1.0e5 + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + ctrlJx: 'curl(ctrl_current)[x]' + ctrlJy: 'curl(ctrl_current)[y]' + ctrlJz: 'curl(ctrl_current)[z]' + conductivity: sigma + em_energy: '(0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' # * 1.0e35 +... diff --git a/papers/maxwells_source_cloaking_paper/2D-Example/input_forward.yaml b/papers/maxwells_source_cloaking_paper/2D-Example/input_forward.yaml new file mode 100644 index 00000000..45156ecc --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/2D-Example/input_forward.yaml @@ -0,0 +1,80 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 10 + Mesh: + dimension: 3 + source: Exodus + mesh file: mesh/thunderbird-2.5d-scaled.exo + element type: hex + Periodic BCs: + Count: 1 + Periodic Condition 1: 'xy-all 1e-10: top;bottom' + Physics: + modules: maxwell + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + Ex: + pec: '0.0' + Ey: + pec: '0.0' + Ez: + pec: '0.0' + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Functions input file: input_functions_forward.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-8 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + Analysis: + analysis type: forward + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 1 + output file: forward-output/forward_output + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + conductivity: sigma + em_energy: '(0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' + +... diff --git a/papers/maxwells_source_cloaking_paper/2D-Example/input_functions.yaml b/papers/maxwells_source_cloaking_paper/2D-Example/input_functions.yaml new file mode 100644 index 00000000..f02fdfcf --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/2D-Example/input_functions.yaml @@ -0,0 +1,70 @@ +%YAML 1.1 +--- +ANONYMOUS: + Functions: + # source block where current starts from + thunderbird: + current x: '0' ## Gaussian pulse + current y: '0' + current z: 'gt*exp(-2*timebub*(txmaxstart)' + xmaxstart: '26.0e-6' + xmaxend: '36.0e-6' + xmind: 'abs(x-xminstart)' + xmindist: 'xmind*xmind*xmind' + xmincut: '(xymaxstart)' + ymaxstart: '26.0e-6' + ymaxend: '36.0e-6' + ymind: 'abs(y-yminstart)' + ymindist: 'ymind*ymind*ymind' + ymincut: '(yxmaxstart)' + xmaxstart: '26.0e-6' + xmaxend: '36.0e-6' + xmind: 'abs(x-xminstart)' + xmindist: 'xmind*xmind*xmind' + xmincut: '(xymaxstart)' + ymaxstart: '26.0e-6' + ymaxend: '36.0e-6' + ymind: 'abs(y-yminstart)' + ymindist: 'ymind*ymind*ymind' + ymincut: '(y {sidedim} or x_coord < -{sidedim} or y_coord > {sidedim} or y_coord < -{sidedim} or z > {sidedim} or z < -{sidedim} +sideset 1 name "pec" + +### check for correctness of mesh +topology check coincident node tet all tolerance 1.0e-4 + +export mesh "cup-spheres-large.exo" dimension 3 overwrite + + diff --git a/papers/maxwells_source_cloaking_paper/3D-Example/input.yaml b/papers/maxwells_source_cloaking_paper/3D-Example/input.yaml new file mode 100644 index 00000000..f2091e16 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/3D-Example/input.yaml @@ -0,0 +1,113 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 0 + Mesh: + dimension: 3 + source: Exodus + mesh file: mesh/cup-spheres-large-scaled.exo + element type: tet + Physics: + modules: maxwell + active controls: true + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + Ex: + pec: '0.0' + Ey: + pec: '0.0' + Ez: + pec: '0.0' + Mass weights: + E: 1.0 + B: 1.0 + Norm weights: + E: permittivity + B: 1/permeability + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Parameters input file: input_params.yaml + Functions input file: input_functions.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-8 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + Analysis input file: input_rol2.yaml + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 10 + output file: opt-output/output + compute objective: true + compute response: false + compute weighted norm: false + compute sensitivities: false + Objective functions: + EM Energy: + type: integrated control + function: '0.5*permittivity*((E[x])^2+(E[y])^2+(E[z])^2) + 0.5/permeability*((B[x])^2+(B[y])^2+(B[z])^2)' + weight: 1.0e37 + blocks: 'observation' + RegObj: + type: integrated control + function: '0.0' + weight: 0.0 + blocks: 'control' + Regularization functions: + l2reg: + type: integrated + location: volume + function: '0.5*(ctrl_current[x]*ctrl_current[x])+0.5*(ctrl_current[y]*ctrl_current[y])+0.5*(ctrl_current[z]*ctrl_current[z])' + weight: 1.0e5 + curlreg: + type: integrated + location: volume + function: '0.5*(curl(ctrl_current)[x]*curl(ctrl_current)[x])+0.5*(curl(ctrl_current)[y]*curl(ctrl_current)[y])+0.5*(curl(ctrl_current)[z]*curl(ctrl_current)[z])' + weight: 1.0e5 + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + ctrlJx: 'curl(ctrl_current)[x]' + ctrlJy: 'curl(ctrl_current)[y]' + ctrlJz: 'curl(ctrl_current)[z]' + conductivity: sigma + em_energy: '(0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' # * 1.0e37 change with reg weight + +... diff --git a/papers/maxwells_source_cloaking_paper/3D-Example/input_forward.yaml b/papers/maxwells_source_cloaking_paper/3D-Example/input_forward.yaml new file mode 100644 index 00000000..186c2540 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/3D-Example/input_forward.yaml @@ -0,0 +1,77 @@ +%YAML 1.1 +--- +ANONYMOUS: + debug level: 0 + verbosity: 10 + Mesh: + dimension: 3 + source: Exodus + mesh file: mesh/cup-spheres-large-scaled.exo + element type: tet + Physics: + modules: maxwell + Initial conditions: + scalar data: true + E: 0.0 + B: 0.0 + Dirichlet conditions: + Ex: + pec: '0.0' + Ey: + pec: '0.0' + Ez: + pec: '0.0' + Discretization: + order: + E: 1 + B: 1 + quadrature: 2 + side quadrature: 2 + Functions input file: input_functions_forward.yaml + Solver: + solver: 'transient' + transient BDF order: 1 + transient Butcher tableau: DIRK-1,2 + workset size: 100 + final time: 2.0e-13 + number of steps: 400 + assembly partitioning: sequential + use basis database: false + use mass database: false + database TOL: 1.0e-13 + linear TOL: 1.0e-8 + max linear iters: 200 + nonlinear TOL: 1.0e-07 + max nonlinear iters: 1 + use preconditioner: true + preconditioner type: Ifpack2 + preconditioner variant: RELAXATION + right preconditioner: true + use direct solver: false + reuse preconditioner: true + reuse Jacobian: true + preconditioner reuse type: full + Belos implicit residual scaling: Norm of Initial Residual + storage proportion: 1.0 + Belos solver: 'BiCGStab' + enable autotune: true + Preconditioner Settings: + "relaxation: type": "Jacobi" + "relaxation: damping factor": 0.5 + "relaxation: backward mode": false + "relaxation: sweeps": 2 + Analysis: + analysis type: forward + Postprocess: + write solution: true + write frequency: 1 + exodus write frequency: 10 + output file: forward_output/output_forward + compute errors: false + Extra cell fields: + Jx: 'current x' + Jy: 'current y' + Jz: 'current z' + conductivity: sigma + em_energy: '(0.5*permittivity*(E[x]^2+E[y]^2+E[z]^2) + 0.5/permeability*(B[x]^2+B[y]^2+B[z]^2))' +... diff --git a/papers/maxwells_source_cloaking_paper/3D-Example/input_functions.yaml b/papers/maxwells_source_cloaking_paper/3D-Example/input_functions.yaml new file mode 100644 index 00000000..78cd3037 --- /dev/null +++ b/papers/maxwells_source_cloaking_paper/3D-Example/input_functions.yaml @@ -0,0 +1,86 @@ +%YAML 1.1 +--- +ANONYMOUS: + Functions: + # source block where current starts from + source: + current x: 'gt*exp(-2*timebub*(txmaxstart)' + xmaxstart: '10.0e-6' + xmaxend: '20.0e-6' + xmind: 'abs(x-xminstart)' + xmindist: 'xmind*xmind*xmind' + xmincut: '(xymaxstart)' + ymaxstart: '10.0e-6' + ymaxend: '20.0e-6' + ymind: 'abs(y-yminstart)' + ymindist: 'ymind*ymind*ymind' + ymincut: '(yzmaxstart)' + zmaxstart: '10.0e-6' + zmaxend: '20.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(zxmaxstart)' + xmaxstart: '10.0e-6' + xmaxend: '20.0e-6' + xmind: 'abs(x-xminstart)' + xmindist: 'xmind*xmind*xmind' + xmincut: '(xymaxstart)' + ymaxstart: '10.0e-6' + ymaxend: '20.0e-6' + ymind: 'abs(y-yminstart)' + ymindist: 'ymind*ymind*ymind' + ymincut: '(yzmaxstart)' + zmaxstart: '10.0e-6' + zmaxend: '20.0e-6' + zmind: 'abs(z-zminstart)' + zmindist: 'zmind*zmind*zmind' + zmincut: '(z mrhyde input_forward.yaml` (parallel run). +4. Run the optimal control problem with `./mrhyde` or `mpirun -np mrhyde`. + +## Preprocessing +- Due to the size of the 2D and 3D mesh files, we've only included the .jou files to generate the mesh on Cubit. Update the last line with the location on your computer and run the jou file to generate the mesh. +- For compliance reasons, we run the examples on a microscale, so you need to rescale the generated meshes to the 1e-6 scale to reproduce our results. You can do this rescaling with the `grepos` library in Trilinos. + +For example for the 2D example, run +- `grepos thunderbird-2.5d.exo thunderbird-2.5d-scaled.exo` + +Then in grepos run +`scale all 1e-6` +`exit` + +For any questions please contact any of the authors on this paper. \ No newline at end of file