Closed shimwell closed 2 years ago
@Shimwell wow so quick
So if i get this right, this means:
1) the nb of particles and all won't be in the simulate() method anymore 2) a geometry can be parsed in export_xml
How would one specify a geometry with a reflective surface out-of-the-box as here:
neutronics_model = NeutronicsModel(
source=my_source,
materials={
'inboard_tf_coils_mat': 'copper',
'center_column_shield_mat': 'WC',
'outboard_pf_coils_mat': 'copper',
'tf_coil_casing_mat': "eurofer",
'pf_coils_mat': 'copper',
'divertor_mat': 'tungsten',
'blanket_mat': 'tungsten'
},
h5m_filename='stage_2_output/dagmc.h5m',
tet_mesh_filename='stage_2_output/unstructured_mesh.h5m',
mesh_tally_tet=['(n,Xa)'] # , '(n,Xa)'
)
results = neutronics_model.simulate(
simulation_batches=4,
simulation_particles_per_batch=1e4,
)
print(results)
should it be passed to NeutronicsModel?
Something like this where geometry
is a openmc.Geometry
import openmc_openmc_wrapper as odw
neutronics_model = odw.NeutronicsModel(
source=my_source,
materials={
'inboard_tf_coils_mat': 'copper',
'center_column_shield_mat': 'WC',
'outboard_pf_coils_mat': 'copper',
'tf_coil_casing_mat': "eurofer",
'pf_coils_mat': 'copper',
'divertor_mat': 'tungsten',
'blanket_mat': 'tungsten'
},
h5m_filename='stage_2_output/dagmc.h5m',
tet_mesh_filename='stage_2_output/unstructured_mesh.h5m',
mesh_tally_tet=['(n,Xa)'] # , '(n,Xa)'
)
neutronics_model.export_xml(
geometry=geometry,
simulation_batches=4,
simulation_particles_per_batch=1e4,
h5m_filename = neutronics_model.simulate()
results = odw.process_results(h5m_filename)
print(results)
@Shimwell oh ok it's nice! I think the examples need to be reworked then for the tests to pass right?
@RemDelaporteMathurin tests are working again and example has been updated, I think this can be merged in to develop
circle ci tests are passing :tada:
If there are no objections I think this is ready to merge
Just fixed a few merge conflicts
Attempt to solve issue #56
What do you think @RemDelaporteMathurin, is this suitable
I will have to fix the tests to get it working as the arguments have moved around between methods a bit