get deltaH from every plugin


70
views
0
4 weeks ago by
Tahir  
Is there a way to save the change in the energy from every plugin ( VolumeLocalFlex, contact, ContactInternal and FocalPointPlasticity plugins) from Python or XML? I would like to plot all these different sources of deltaH together with the overall change in energy of the system.

I see that overall system current energy can be found using self.potts.getEnergy() and then save this term for every Step to calculate deltaH. But how would i obtain similar energy from every plugin?

Another thing I would like to know is that, can we calculate the change in energy from plugins and over all system in a certain part of the grid to observe local variations?

Any help will be highly appreciated. Thanks.
Community: CompuCell3D

3 Answers


0
29 days ago by
Yes, there is with one limitation. It can only be used when you are using single CPU.

Take a look at demos in Demos/SimulationSettings/SimulationStatistics/. there are 3 demos there. One saves output for every pixel copy attempt and at lease one saves cumulative delt H for each plugin during entire MCS.

You may also read pages 3-8 in the CC3D reference Manual. Some information there might be outdated but it will give you an idea how to set up detailed statistical output of the energy terms at each MCS

http://www.compucell3d.org/BinDoc/cc3d_binaries/Manuals/CompuCell3D_Reference_Manual_v.3.7.4.pdf
Hi Maciek, Thanks for your suggestion, I tried it but still having some issues with it. Can you please have a look at my detailed comment on this post below. Thanks
written 14 days ago by Tahir  
0
14 days ago by
Tahir  
Dear Maciek,

Thank you for your reply. I followed your suggestion and used the following commands in the XML code to extract cumulative delta H for each plugin.

<EnergyFunctionCalculator Type="Statistics">

          <OutputFileName Frequency="10">statData_1.txt</OutputFileName>

      </EnergyFunctionCalculator>

It saved output for every plugin but every plugin has 3 columns (Accpted, rejected and Total). Moreover, There are three more additional columns denoted as NAcc, NRej and NTot. Is this NTot is the cumulative delta H of the whole system? In my case, this value is positive and very high number 25,000+ throughout the simulation, however, if this is change in energy, I would expect it to be negative due to energy minimisation?  Another thing I noticed is that, the NTot is too high whereas the data from every plugin (Total columns) is on a very small scale (between 0-40 but still positive numbers). In principal, when I add up energies from all the plugins, I should get the total energy of the system. Is that right?

Can you please guide me further as soon as possible. Thanks a lot in advance.

0
14 days ago by
Ntot is the number of total pixel copy attempts that resulted in evaluation of delta H. NRej - number of rejected pixel copy attempts NAcc - number of accepted copy attempts.

Ntot=NAcc + NRej


So the 25000 + corresponds to the total number of attempted pixel copies for which CC3D evaluated delta H. The reason it is different from step to step is that for some  some of the attempts CC3D does not evaluate energy because source and destination pixel belong to the same cell.
The energies are listed in Subsequent columns. Yes, when you add delta H listed in each column multiplied by NAcc for each plugin you will get a number that is roughly equal to the overall change of energy reported on the main screen.

What is reported in the columns of of the statData_1.txt is the average and std dev of delta H for each plugin per pixel copy attempt. I know this might sound confusing so let me explain more. During each MCS there will be many evaluations of delta H from each plugin. CC3D keeps track of every single delta H due to a single pixel copy attempt. At the end of MCS it will compute the average delta H (hence delta H per pixel copy attempt) and the standard dev.
I hop this makes sense but if it is unclear let me know







Please login to add an answer/comment or follow this question.

Similar posts:
Search »