{"id":19668226,"url":"https://github.com/nsmith5/modela.jl","last_synced_at":"2026-02-10T17:33:54.768Z","repository":{"id":103593752,"uuid":"263483465","full_name":"nsmith5/ModelA.jl","owner":"nsmith5","description":null,"archived":false,"fork":false,"pushed_at":"2020-05-13T00:21:50.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-03T22:42:12.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nsmith5.png","metadata":{"files":{"readme":"README.html","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-13T00:21:37.000Z","updated_at":"2020-05-13T00:21:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfcabe39-0ea5-4001-b65f-e63d5c822b00","html_url":"https://github.com/nsmith5/ModelA.jl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nsmith5/ModelA.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmith5%2FModelA.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmith5%2FModelA.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmith5%2FModelA.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmith5%2FModelA.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nsmith5","download_url":"https://codeload.github.com/nsmith5/ModelA.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nsmith5%2FModelA.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29309593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T16:09:25.305Z","status":"ssl_error","status_checked_at":"2026-02-10T16:08:52.170Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T16:34:50.591Z","updated_at":"2026-02-10T17:33:54.749Z","avatar_url":"https://github.com/nsmith5.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE HTML\u003e\n\u003chtml\u003e\n \u003chead\u003e\n  \u003cmeta charset=\"utf-8\"/\u003e\n  \u003ctitle\u003e\n   Made with Remarkable!\n  \u003c/title\u003e\n  \u003clink href=\"http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/github.min.css\" rel=\"stylesheet\"/\u003e\n  \u003cstyle type=\"text/css\"\u003e\n   html{font-size:100%;overflow-y:scroll;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{color:#444;font-family:Georgia,Palatino,\"Palatino Linotype\",Times,\"Times New Roman\",serif;font-size:12px;line-height:1.5em;padding:1em;margin:auto;max-width:42em;background:#fefefe}a{color:#0645ad;text-decoration:none}a:visited{color:#0b0080}a:hover{color:#06e}a:active{color:#faa700}a:focus{outline:dotted thin}a:active,a:hover{outline:0}::-moz-selection{background:rgba(255,255,0,.3);color:#000}::selection{background:rgba(255,255,0,.3);color:#000}a::-moz-selection{background:rgba(255,255,0,.3);color:#0645ad}a::selection{background:rgba(255,255,0,.3);color:#0645ad}p{margin:1em 0}img{max-width:100%}h1,h2,h3,h4,h5,h6{font-weight:400;color:#111;line-height:1em}h4,h5,h6{font-weight:700}h1{font-size:2.5em}h2{font-size:2em}h3{font-size:1.5em}h4{font-size:1.2em}h5{font-size:1em}h6{font-size:.9em}blockquote{color:#666;margin:0;padding-left:3em;border-left:.5em #EEE solid}hr{display:block;height:2px;border:0;border-top:1px solid #aaa;border-bottom:1px solid #eee;margin:1em 0;padding:0}code,kbd,pre,samp{color:#000;font-family:monospace,monospace;font-size:.98em}pre{white-space:pre;white-space:pre-wrap;word-wrap:break-word}b,strong{font-weight:700}dfn{font-style:italic}ins{background:#ff9;color:#000;text-decoration:none}mark{background:#ff0;color:#000;font-style:italic;font-weight:700}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}ol,ul{margin:1em 0;padding:0 0 0 2em}li p:last-child{margin:0}dd{margin:0 0 0 2em}img{border:0;-ms-interpolation-mode:bicubic;vertical-align:middle}table{border-collapse:collapse;border-spacing:0}td{vertical-align:top}@media only screen and (min-width:480px){body{font-size:14px}}@media only screen and (min-width:768px){body{font-size:16px}}@media print{*{background:0 0!important;color:#000!important;filter:none!important;-ms-filter:none!important}body{font-size:12pt;max-width:100%}a,a:visited{text-decoration:underline}hr{height:1px;border:0;border-bottom:1px solid #000}a[href]:after{content:\" (\" attr(href) \")\"}abbr[title]:after{content:\" (\" attr(title) \")\"}.ir a:after,a[href^=\"javascript:\"]:after,a[href^=\"#\"]:after{content:\"\"}blockquote,pre{border:1px solid #999;padding-right:1em;page-break-inside:avoid}img,tr{page-break-inside:avoid}img{max-width:100%!important}@page :left{margin:15mm 20mm 15mm 10mm}@page :right{margin:15mm 10mm 15mm 20mm}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}}table{padding:0}table tr{border-top:1px solid #ccc;background-color:#fff;margin:0;padding:0}table tr:nth-child(2n){background-color:#aaa}table tr th{font-weight:700;border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}table tr td{border:1px solid #ccc;text-align:left;margin:0;padding:6px 13px}table tr td :first-child,table tr th :first-child{margin-top:0}table tr td:last-child,table tr th :last-child{margin-bottom:0}\n  \u003c/style\u003e\n \u003c/head\u003e\n \u003cbody\u003e\n  \u003ch1\u003e\n   Model A Simulator\n  \u003c/h1\u003e\n  \u003ch2\u003e\n   Introduction\n  \u003c/h2\u003e\n  \u003cp\u003e\n   \u003cimg alt=\"\" src=\"./figure_1.png\"/\u003e\n  \u003c/p\u003e\n  \u003cp\u003e\n   Welcome to the Model A simulator! In the narrowest sense this is a place to see a particular stochastic partial differential equation solved that is of the following form:\n  \u003c/p\u003e\n  \u003cp\u003e\n   $$ \\frac{\\partial \\phi (x,t)}{\\partial t} = -M \\left( W_o^2 \\nabla^2 \\phi - a_2 \\phi - a_4 \\phi^3 \\right) + \\zeta (x,t)   $$\n  \u003c/p\u003e\n  \u003cp\u003e\n   Where the driving force $\\zeta(x,t)$ is a gaussian random variable with the following statistics:\n  \u003c/p\u003e\n  \u003cp\u003e\n   $$ \\left\u0026lt; \\zeta(x,t) \\right\u0026gt; = 0, \\,\\,\\,\\,\\,\\,\n   \u003cbr/\u003e\n   \\left\u0026lt; \\zeta(x_1, t_1) \\zeta(x_2, t_2) \\right\u0026gt; = 2 M k_b T \\delta(x_2 - x_1) \\delta(t_2 - t_1). $$\n  \u003c/p\u003e\n  \u003cp\u003e\n   The importance of Model A or\n   \u003cem\u003e\n    time-dependent Ginzburg-Landau equation\n   \u003c/em\u003e\n   is that it is model of the dynamics of a non-conserved order parameter.\n  \u003c/p\u003e\n  \u003ch3\u003e\n   Discrete models\n  \u003c/h3\u003e\n  \u003cp\u003e\n   To understand what is meant by this, consider for a moment the Ising model.\n  \u003c/p\u003e\n  \u003cp\u003e\n   $$ \\beta H = \\sum_{\\left\u0026lt; i, j \\right\u0026gt;} J_{ij} \\sigma_i \\sigma_j + h \\sum_i \\sigma_i$$\n  \u003c/p\u003e\n  \u003cp\u003e\n   The variables $\\sigma$ are the spin angular momenta of individual atoms in a discrete lattice. At this point if you'd like to simulate the dynamics of a lattice you can impose one of two different types of kinetics: Glauber or Kawasaki.\n  \u003c/p\u003e\n  \u003cp\u003e\n   In Glauber kinetics the total angular moment is not conserved. The free energy cost of a spin flip is calculated at any site and the probability of flipping is weighted accordingly.\n  \u003c/p\u003e\n  \u003cp\u003e\n   Alternatively, in Kawasaki dynamics, the total angular momentum is conserved. Specifically the angular momentum is conserved locally by implimenting a set of kinetics that local rearranges a small domain of spins instead of flipping them. Again, the cost of all rearrangements is considered and probabilities of those rearrangements are weighted accordingly.\n  \u003c/p\u003e\n  \u003ch3\u003e\n   Continuum models\n  \u003c/h3\u003e\n  \u003cp\u003e\n   In Ginzburg-Landau theory, continuous fields are considered at the\n   thermodynamic variables of interest. These field are almost always coarse\n   grained variables from discrete systems. If we take the Ising model again,\n   for example, we can construct a coase grained field from our discrete spins\n   through an averaging process. Consider of ball of radius $R$ centered at\n   position $x$. We can define a field $S(x)$ such that it is the average of\n   all spins, $\\sigma$, inside the ball. As radius of the ball increases the\n   field becomes continuous and we've constructed a coarsed-grained order\n   parameter.  \u003c/p\u003e\n  \u003cp\u003e\n   Ginzburg-Landau theory considers the thermodynamics of such fields and once\n   again, if we'd like to simulate the dynamics of such fields we are left with\n   a choice between two different types of kinetics: conserved and\n   non-conserved. The continuum version of our discrete Glauber kinetics is\n   called model A. As we stated before it simulated the dynamics of a\n   non-conserved order parameter.  \u003c/p\u003e\n  \u003cp\u003e\n   For a general order parameter $\\phi$ the equation of motion is written as:\n  \u003c/p\u003e\n  \u003cp\u003e\n   $$ \\frac{\\partial \\phi(x,t)}{\\partial t}  = - M \\frac{\\delta H[\\phi]}{\\delta\n   \\phi(x,t)} + \\zeta (x,t) $$ \u003c/p\u003e\n  \u003cp\u003e\n   Where the source term $\\zeta$ follows the above mentioned statistics and\n   $H[\\phi]$ is the Ginzburg free energy functional of the system. In our case\n   we'll use a simple $\\phi^4$ model for the free energy functional: \u003c/p\u003e\n  \u003cp\u003e\n   $$ H_{\\phi^4}[\\phi] =  \\int d^d x \\lbrace  (W_o \\nabla \\phi)^2 + a_2\n   (\\phi)^2 + a_4 (\\phi)^4  \\rbrace $$ \u003c/p\u003e\n  \u003ch2\u003e\n   Simulating\n  \u003c/h2\u003e\n  \u003cp\u003e\n   All of the code is written in\n   \u003cem\u003e\n    Julia\n   \u003c/em\u003e\n   (0.3 release should work) but also requires\n   \u003cem\u003e\n    Python\n   \u003c/em\u003e\n   and a python package called\n   \u003cem\u003e\n    Matplotlib\n   \u003c/em\u003e\n   .\n  \u003c/p\u003e\n  \u003cul\u003e\n   \u003cli\u003e\n    Julia info: http://julialang.org\n   \u003c/li\u003e\n   \u003cli\u003e\n    Matplotlib: http://matplotlib.org\n   \u003c/li\u003e\n  \u003c/ul\u003e\n  \u003cp\u003e\n   To enable Matplotlib calls from Julia just install the PyPlot package inside the Julia shell via:\n  \u003c/p\u003e\n  \u003cpre\u003e\u003ccode\u003ejulia\u0026gt; Pkg.add(\"PyPlots\")\n\u003c/code\u003e\u003c/pre\u003e\n  \u003cp\u003e\n   Afterwards the simulation can be from the command line from the installation folder\n  \u003c/p\u003e\n  \u003cpre\u003e\u003ccode\u003e\u0026gt; julia script.jl\n\u003c/code\u003e\u003c/pre\u003e\n  \u003cp\u003e\n   Parameters can be changed inside the script.jl where the relevent parameters are commented.\n  \u003c/p\u003e\n  \u003ch2\u003e\n   Contact Info\n  \u003c/h2\u003e\n  \u003cp\u003e\n   This model code repository and set of notes was made by me to learn and help teach topics in thermodynamics. The notes and code are free to use and distribute so long as they are properly attributed to me (eg. don't pretend you made these please).\n  \u003c/p\u003e\n  \u003cul\u003e\n   \u003cli\u003e\n    Nathan Smith\n   \u003c/li\u003e\n   \u003cli\u003e\n    nathan.smith5@mail.mcgill.ca\n   \u003c/li\u003e\n   \u003cli\u003e\n    http://www.nate-smith.net\n   \u003c/li\u003e\n  \u003c/ul\u003e\n  \u003cscript src=\"http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js\"\u003e\n  \u003c/script\u003e\n  \u003cscript\u003e\n   hljs.initHighlightingOnLoad();\n  \u003c/script\u003e\n  \u003cscript src=\"https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\" type=\"text/javascript\"\u003e\n  \u003c/script\u003e\n  \u003cscript type=\"text/javascript\"\u003e\n   MathJax.Hub.Config({\"showProcessingMessages\" : false,\"messageStyle\" : \"none\",\"tex2jax\": { inlineMath: [ [ \"$\", \"$\" ] ] }});\n  \u003c/script\u003e\n \u003c/body\u003e\n\u003c/html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsmith5%2Fmodela.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnsmith5%2Fmodela.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnsmith5%2Fmodela.jl/lists"}