Giter Club home page Giter Club logo

decay's Introduction

Decay

Program for simulation of radioactive decay.

When the program is started, a radioactive isotope is randomly selected from the database. The chemical symbol of the selected isotope is displayed to the student. The objective is to find the half-life, decay constant, lifetime of a radioactive isotope. Then, using the found half-life, identify a specific isotope of a given element.

The program operates in one of two modes: Half-Life and Decay Constant.

In Half-Life mode, simulation continues until the number of decayed atoms reaches half of the initial number of atoms.

In Decay Constant mode, the simulation continues until the decay time reaches the value set by the user. The decay time can be set between 1 and 10 seconds using the spinner control. You can also enter an arbitrary value in the textbox; to set infinite time leave the textbox blank.

To start the simulation, press the Start button. During the simulation, the atom states are displayed in the viewport; the number of undecayed (remaining) and decayed atoms and the current time are displayed on the corresponding indicators.

To reset all atoms to active (undecayed) state, use the Reset button. It is not necessary to press the Reset button before each start of the simulation: the program performs reset automatically.

To determine the half-life, select Half-Life mode and run the simulation. At the end of the simulation (when half of all nuclei have decayed), the time displayed by the program will be the half-life. Repeat the experiment 10 times. Note that the half-life in each experiment will be slightly different due to the stochastic nature of the process. Find the average half-life (T1/2).

To determine the decay constant, set mode 2 and decay time to 1 s. Run the experiment and record the number of undecayed atoms N, as well as the natural logarithm of this value ln N. Repeat the experiment for decay times of 2, 3, ... 10 s. The slope of the dependence (ln N(t)) will be equal to the decay constant (lambda). Find the average lifetime (tau=1/lambda) and the half-life (T1/2=ln2/lambda).

To identify an isotope, open Table of Isotopes and enter the symbol of the element under study in the search bar. Then scroll down to the isotope that has the closest half-life to that determined from the simulation.

Localization

The program has multilingual support. Translation into other languages can be done by creating additional resource-only DLLs. The package contains such DLL for Ukrainian language. The procedure how to create localized satellite DLL is described here. To switch language use command line parameter /lang XXX, where XXX is three letter code of language. For example, to set Ukrainian language launch program like this: Decay.exe /lang UKR.

Building

To build the application a Visual Studio 2019 solition is provided.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.