Author Topic: about temperatureProfile in NonEquilibriumMomentumExchange Methods  (Read 4186 times)

0 Members and 1 Guest are viewing this topic.

Offline hydro

  • Regular QuantumATK user
  • **
  • Posts: 11
  • Country: 00
  • Reputation: 0
    • View Profile
Hi,I found "NonEquilibriumMomentumExchange Methods"
http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.nonequilibriummomentumexchange.html
one of methods is "temperatureProfile()" .
so, how can i to use it? Is there a example?

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 164
  • Country: dk
  • Reputation: 25
    • View Profile
This method essentially does the same as the "Temperature Profile" analysis in the MDAnalyzer tool. So if you set up your momentum-exchange-hook as
Code
momentum_exchange_hook = NonEquilibriumMomentumExchange(
    configuration=bulk_configuration,
    exchange_interval=100,
    heat_source='right',
    heat_sink='left',
    update_profile_interval=20,
    profile_resolution=2.0*Ang
)
To activate the calculation of the temperature profile make sure that the update_profile_interval is larger than zero, as this value determines how often the temperature profile is sampled. Via the parameter profile_resolution the bin width of the temperature profile can be set. Then, after the simulation has finished, you can query the temperature profile via
Code
(z_values, t_profile) = momentum_exchange_hook.temperatureProfile()
It will give you two PhysicalQuantity arrays z_values and t_profile, which you for example can plot it using pylab
Code
import pylab

pylab.plot(z_values.inUnitsOf(Ang), t_profile.inUnitsOf(Kelvin))
pylab.show()
or process the data in any other way you want. However, I would recommend to use the corresponding feature in the MDAnalyzer, as this allows you to specify a start time which makes it easier to check for convergence of the profile.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys

Offline hydro

  • Regular QuantumATK user
  • **
  • Posts: 11
  • Country: 00
  • Reputation: 0
    • View Profile
This method essentially does the same as the "Temperature Profile" analysis in the MDAnalyzer tool. So if you set up your momentum-exchange-hook as
Code
momentum_exchange_hook = NonEquilibriumMomentumExchange(
    configuration=bulk_configuration,
    exchange_interval=100,
    heat_source='right',
    heat_sink='left',
    update_profile_interval=20,
    profile_resolution=2.0*Ang
)
To activate the calculation of the temperature profile make sure that the update_profile_interval is larger than zero, as this value determines how often the temperature profile is sampled. Via the parameter profile_resolution the bin width of the temperature profile can be set. Then, after the simulation has finished, you can query the temperature profile via
Code
(z_values, t_profile) = momentum_exchange_hook.temperatureProfile()
It will give you two PhysicalQuantity arrays z_values and t_profile, which you for example can plot it using pylab
Code
import pylab

pylab.plot(z_values.inUnitsOf(Ang), t_profile.inUnitsOf(Kelvin))
pylab.show()
or process the data in any other way you want. However, I would recommend to use the corresponding feature in the MDAnalyzer, as this allows you to specify a start time which makes it easier to check for convergence of the profile.
I will try it, thanks a lot :)