Hello group,
I have created a tokamak reactor using submersion tokamak object .I used paramak version 8.2.0 and I wanna perform a depletion analysis on magnetic coils. How do I calculate the volume of the coils?
I recently added an example of getting volumes of DAGMC cells using pydagmc
Here is a link to the notebook
However you could also get the volume of each part in the assembly using cadquery. This is not as accurate as it is not quite the same as the meshed volume that pydagmc gives you.
Finding Volume of DAGMC Cell
Following on from the task on finding the volume of a CSG cell it is also possible to find the volume of a DAGMC cell.
One of the nice features of DAGMC is that we can get the volume without having to run a simulation.
There is a nice Python package that we can use for this https://github.com/svalinn/pydagmc
First we import the pydagmc/dagmc Python package
import pydagmc
Then we load up a DAGMC file.
model = pydagmc.DAGModel('dagmc.h5m')
We then grab the volume of the first cell
v1 = model.volumes_by_id[1] # get volume by id number 1
print(v1.volume) # units are in cm^3
The pydagmc package has lots of features that I encourage you to explore.
See if you can find the number of cells and the volume of each cell