idaholab / magpie

Mesoscale Atomistic Glue Program for Integrated Execution
http://mooseframework.org/magpie/
GNU Lesser General Public License v2.1
8 stars 28 forks source link

Block ID not functioning for PKAConstant & PKAFunction #479

Open ChrocheMisawa opened 2 years ago

ChrocheMisawa commented 2 years ago

Dear all,

    I recently found this application and found it particularly interesting, because my master's thesis was to couple MOOSE with MCNP and TRIM(in a more robust and simple way), and calculate the damage(dpa) caused in a multi-phase grain geometry. Therefore, I was exciting to see if I can reproduce my work done in the past with this new app.
    So I started working with simple test cases, first with just a PKAGun shooting ions to a homogenous material, which worked perfectly fine and agrees with the normal TRIM results. However, when I was trying to create an isotropic ion source(with PKAConstant or PKAFunction) in just a local region with specific block ID, the calculation gives results that indicate PKAs were still being distributed across the entire mesh.
    Is it due the application itself, or am I writing the input file wrong? I have attached my input file below, it would be great if I can get any help.

Thank you, Zeyu Chen

[Mesh] [./generator] type = GeneratedMeshGenerator dim = 3 nx = 50 ny = 1 nz = 1 xmin = -50
xmax = 50 ymin = -1 ymax = 1 zmin = -1 zmax = 1 elem_type = HEX8 [] [block1] type = SubdomainBoundingBoxGenerator input = generator bottom_left = '-50 -1 -1' top_right = '-1 1 1' block_id = 0 [] [block2] type = SubdomainBoundingBoxGenerator input = block1 bottom_left = '-1 -1 -1' top_right = '1 1 1' block_id = 1 [] [block3] type = SubdomainBoundingBoxGenerator input = block2 bottom_left = '1 -1 -1' top_right = '50 1 1' block_id = 2 []

[]

[Mesh]

type = MyTRIMMesh

dim = 3

nx = 50

ny = 1

nz = 1

xmin = -50

xmax = 50

ymin = -1

ymax = 1

zmin = -1

zmax = 1

block = 1

[]

[Problem] kernel_coverage_check = false []

[Variables] [./dummys] [../] []

[AuxVariables] [./Be] order = CONSTANT family = MONOMIAL initial_condition = 1 [../]

[./vac] order = CONSTANT family = MONOMIAL [../] []

[AuxKernels] [./vac] variable = vac type = MyTRIMElementResultAux runner = runner ivar = 0 defect = VAC [../] []

[BCs] [./Periodic] [./all] auto_direction = 'x y z' [../] [../]

[]

[UserObjects] [./constant] type = PKAConstant E = 2.73e6 Z = 1 m = 3 pka_rate = 1 block = 1 use_displaced_mesh = true

force_preic =true

# seed = 1

[../]

[./constant]

type = PKAGun

E = 2.73e6

Z = 1

m = 3

num_pkas = 10000

point = '-50 0 0'

direction = '-1 0 0'

[../]

[./rasterizer] type = MyTRIMRasterizer var = 'Be' M = '9' Z = '4'

Edisp = '16.3'

length_unit = MICROMETER
periodic_var = dummys
site_volume = 0.00797
pka_generator = constant

[../] [./runner] type = MyTRIMElementRun rasterizer = rasterizer [../] []

[Postprocessors] [./total_vacancies] type = ElementIntegralVariablePostprocessor variable = vac [../] []

[Executioner] type = Transient num_steps = 2 nl_abs_tol = 1e-10 []

[Outputs] exodus = true []

dschwen commented 2 years ago

Block restriction is not implemented for the BCMC. It should not be hard to add if it is required.

ChrocheMisawa commented 2 years ago

That explains, thank you for your reply!

I think it would be nice to be implemented it so that users can study the impact just from some ion-emitting material. Such as the plot in the link below: https://drive.google.com/file/d/1m6nVBEBNSAZ0oUktCaaUrwlBDMSTKOqF/view?usp=sharing

Also, I'm not sure how MyTRIM handles the BCMC, but it might be nice if the application can also gather information on particles' end location (instead of just PKAs or Energy Deposition), such that the user can study some features such as Helium accumulation on certain geometries.

Thank you and best wishes, Zeyu Chen