Hi - just forgetting about hydrides for a moment, I’ve been trying to put in just standard traps. Am I correct in thinking that plotting the field ‘retention’ should show me the concentration of trapped hydrogen?
I have a 3mm long 1D set-up, and start off with 60 wt.ppm of H in one half. Without traps, this works, and over time I get 30wt.ppm across the whole system.
THen I try and put just 10 wt.ppm’s worth of traps in one half of my sample. The ‘retention’ field then shows 60 wt.ppm of H in the half with traps, and zero in the other half. Please could you advise?
(I’m also not sure whether the E_k for trapping and the E_p for detrapping should include the diffusion barrier of 0.1103 eV?
The ‘retention’ field shows the combined population of the mobile and all the trapped populations of hydrogen. It is possible to export the trap concentration by itself too if that is what you are after? This is done by exporting the field ‘n’ where n is the numerical order of the traps defined.
But regarding your issue would you be able to send a copy of the script you used but within 3x ` on either side, this will allow you to format the code like this: example
Thankyou. (I thought I’d tried field “1” but I must have made some mistake somewhere.
I’ve re-tried the same programme but with a binding energy of 0.42 eV rather than 0.5 eV - the results all now make perfect sense: the trapping is just under 10 wt.ppm (for 0.5 eV I expect 10 wt.ppm trapped), and the mobile concentration plus the trapped concentration gives the retention concentration.
So I’m just not sure what goes wrong at 0.5 eV - I’ll play with the dt stepsize and see if that works. (PS I’m sorry, I’m not quite sure what you meant about sending the script with ‘’’ {script text} ‘’’ it didn’t seem to format any differently
Thankyou again for your help
As @jhdark mentioned, formatting your code makes it easier for us to assist you.
To format your code you need to use the backtick symbol (`) not the apostrophe ’
Hi James, for “This is done by exporting the field ‘n’ where n is the numerical order of the traps defined.”, can I ask that what does ‘the numerical order of the traps defined’ stand for? Does it mean that for example I have three different traps which the order is trap1, trap2 and trap3 in one material in my model, if I want to know the trap2’s concentration, should I use F.TotalVolume(field="2", volume=) for export?
Potentially yes. The number is based on the different species, so field=“0” will always be the mobile concentration, then the numbering of the fields for the traps follows the order in which they are defined in the list given to traps attribute of the Simulation class.