How to run python and looking for an example of building an assembly

hello everyone:

I don’t know how to run openmc with python API.
In the example files, there are three files: jupter ,python and xml.
I know how to run openmc in xml files, it is easy.
but I don’t know how to deal with those in python.
for example, in /python/ basic/build-xml.py, I have no idea how to run? what should i do?

I am trying to learn how to build an assembly.
I didn’t find one similar model in examples files.
Is there any model available for reference?

I have no idea how to build it.

thanks you very much for guiding me

Hye

In terminal navigate to directory containing .py file for example. Type python build-xml.py. That will build the xml files which you can run easily

Thanks ,it did works!!

在 2018年12月27日星期四 UTC+8下午7:21:11,Khurrum写道:

hello everyone:

I have just found some tips in the guidebook:

oh yeah, I finally get to know how to use it
It is easy to implement.
build an empty .py files and type as the following text:
import openmc
aaaa=openmc.examples.pwr_assembly()
aaaa.export_to_xml()

save and run this .py and we can easily get a 17*17 PWR assembly model.
This might be very useful for new learner likes me hahahah

在 2018年12月27日星期四 UTC+8下午9:16:28,xuezhon…@gmail.com写道: