Advanced Programming in Engineering Lecture Notes

Total Page:16

File Type:pdf, Size:1020Kb

Advanced Programming in Engineering Lecture Notes Advanced Programming in Engineering lecture notes P.J. Visser, S. Luding, S. Srivastava March 13, 2011 Changes 13/3/2011 Added Section 7.4 to 7.7. Added Section 4.4 7/3/2011 Added chapter Chapter 7 23/2/2011 Corrected the equation for the average temperature in terms of micro- scopic quantities, Eq. 3.14. Corrected the equation for the speed distribution in 2D, Eq. 3.19. Added links to sources of `true' random numbers available through the web as footnotes in Section 5.1. Added examples of choices for parameters of the LCG and LFG in Section 5.1.1 and 5.1.2, respectively. Added the chi-square test and correlation functions as ways for testing random numbers in Section 5.1.4. Improved the derivation of the average squared distance of particles in a random walk being linear with time, in Section 5.2.1. Added a discussion of the meaning of the terms in the master equation, in Section 5.2.5. Small changes. 19/2/2011 Corrected the Maxwell-Boltzmann distribution for the speed, Eq. 3.19. 14/2/2011 1 2 Added Chapter 6. 6/2/2011 Verified Eq. 3.15 and added footnote discussing its meaning in case of periodic boundary conditions. Added formula for the radial distribution function in Section 3.4.2, Eq. 3.21. 31/1/2011 Added Chapter 5. 9/1/2010 Corrected labels on the axes in Fig. 3.10, changed U · " and r · σ to U=" and r/σ, respectively. Added truncated version of the Lennard-Jones potential in Section 3.3.1. Corrected speed distribution, Eq. 3.19 to be valid in 2D. Small changes. 3/12/2010 Added section on simulating fluids, Section 3.3. Added section on statistical mechanics, Section 3.4. 13/12/2010 (2) Corrected that spring equilibrium lengths for Np particles in 2D are fully determined by a particle pair rather than a particle. I.e. the equiblibrium lengths of Section 3.2.2 are req;ij; i = 1::Np; j = 1::Np, rather than req;i; i = 1::Np. Corrected that the outer loop of the force calculation, Algorithm 4, can run from 1 to Np − 1 rather than from 1 to Np. Added section on the potential and kinetic energy in 2D, Section 3.2.3. Added exercise asking to add the computation of the potential and kinetic energy to the algorithm. Small changes. 13/12/2010 3 Changed algorithms. Loop variables are now updated at the start of an integration step rather than the end. Positions at the current time step is stored rather than the position at the next time step. Loop runs from n = 0 to n = Nt rather than n = 1 to n = Nt. It makes more sense this way. T Corrected ~ri = xi yi ; i = 1::Np to ~ri = xi yi ; i = 1::Np in Sec- tion 3.2.3. Corrected force calculation for particles connected with springs in 2D, Section 3.2; introduced spring compression δ and corrected that ~nij is the vector to particle i from particle j, not from particle i to particle j. Expanded section on solids, Section 3.2.4 a bit. Other small changes. Preface The present script attempts to describe into sufficient detail the material treated during the lectures. It is based mainly on handwritten notes made by the author during the 09/10 lectures. It therefore attempts to largely reflect the material as lectured by professor Luding (the topics of differential equations, numerical integration of ordinary differential equations, molecular dynamics, random numbers and fractals), Katia Bertoldi (the topic of finite element method) and Anthony Thornton (the topics of finite volume method and SPH method). It is a work in progress, and as of yet only material covering the first few lectures has been written. The material that has been written will become available in parallel to the lectures covering it. The latest version will be available through Blackboard. For certain topics, hyperlinks that point to further reading and other helpful places have been added to this document. Of course these will only be available when reading the digital version in a PDF reader supporting hyperlinks, such as Adobe Reader 1. Throughout this document exercises are described. They are intended for self study purposes and are not mandatory. Many thanks to all who have helped out in making this document, in particular to professor Luding, Saurabh Srivastava, Thomas Weinhart and Martin Robinson for their feedback on drafts of the document. I hope you find this document a helpful addition to the lectures. I am sure that you will encounter many mistakes, be it in spelling or content. Any corrections and other comments would be greatly appreciated. Please send them to [email protected]. 1available on http://get.adobe.com/reader/ 4 Contents 1 Numeral systems 8 1.1 Representation of positive integers and real numbers . .8 1.2 Representation of negative numbers . .9 2 Ordinary differential equations 11 2.1 The harmonic oscillator . 11 2.1.1 Analytic solution . 12 2.2 Nondimensionalization . 13 2.3 Numerical integration of ODE's . 14 2.3.1 Euler integration . 15 2.3.2 Euler-Cromer integration . 16 2.3.3 Verlet integration . 16 2.3.4 Runge-Kutta integration . 17 2.3.5 MATLAB ode45 . 19 2.3.6 Other integration schemes . 21 3 Molecular Dynamics 23 3.1 Particles in one dimension connected with springs . 23 3.1.1 Two particles connected with a spring . 23 3.1.2 Np particles connected with a spring . 24 3.1.3 Debugging using laws of physics . 26 3.2 Particles in two dimensions connected with springs . 28 3.2.1 Two particles in two dimensions connected with a spring 29 3.2.2 Np particles in two dimensions connected with springs 30 3.2.3 An algorithm for 2D molecular dynamics . 31 3.2.4 Modeling a solid . 36 3.3 Simulating fluids using molecular dynamics . 38 3.3.1 Potentials . 39 3.3.2 Efficiently simulating fluids . 41 3.4 Statistical mechanics, connecting microscopic and macroscopic properties . 44 3.4.1 Obtaining familiar macroscopic quantities from simu- lations . 45 5 CONTENTS 6 3.4.2 Other important concepts in statistical mechanics . 47 3.4.3 Local instantaneous quantities . 49 3.4.4 Finding new microstates . 49 4 The Finite Element Method 50 4.1 The finite element method in the quasistatic limit . 51 4.1.1 The quasistatic limit . 51 4.1.2 The bar element . 52 4.1.3 An example of solving a problem with FEM . 53 4.1.4 Elements in arbitrary orientation . 56 4.2 Formal procedure of deriving the stiffness matrix in FEM . 57 4.2.1 Derivation of the strong formulation . 58 4.2.2 Derivation of the weak formulation . 59 4.2.3 Discretization . 61 4.3 Dynamic formulation for FEM . 63 4.3.1 Discretization of the dynamic formulation; the mass matrix . 64 4.3.2 Modal analysis . 68 4.3.3 Transient analysis; the Newmark-β method . 69 4.4 Finite Element Method for Nonlinear Systems . 70 4.4.1 A primer on nonlinearities . 70 4.4.2 Conjugate Gradient Method . 71 4.4.3 Newton-Raphson Method . 71 4.4.4 Nonlinear bar . 72 4.4.5 Newton's method for nonlinear finite elements . 73 5 Random numbers 75 5.1 Random number generators . 75 5.1.1 The linear congruential generator . 76 5.1.2 The lagged Fibonacci generator . 76 5.1.3 Other random number generators . 77 5.1.4 Testing randomness . 77 5.2 Random walks . 78 5.2.1 The one dimensional random walk . 79 5.2.2 Random walks in 3D . 81 5.2.3 Continuous time random walks . 81 5.2.4 The probability distribution for the position of a par- ticle in a random walk . 81 5.2.5 The random walk and diffusion . 82 6 Smoothed Particle Hydrodynamics 84 6.1 Introduction . 84 6.2 Interpolation . 85 6.2.1 Integral and summation interpolants . 85 CONTENTS 7 6.2.2 First derivatives . 86 6.3 Simple Equations of Motion . 86 6.3.1 SPH equations of motion satisfying the conservation laws ............................ 86 6.3.2 Integration of the equations of motion . 87 6.4 Viscosity . 87 7 Finite Volume Method 88 7.1 The FVM integral equation . 88 7.2 Total variation diminishing schemes . 91 7.3 The CFL condition . 92 7.4 The Lax-Friedrichs method . 92 7.5 Flux limiters . 93 7.6 TVD Lax-Friedrichs . 94 7.7 Initial and boundary conditions . 95 7.7.1 Initial conditions . 95 7.7.2 Boundary conditions . 95 Chapter 1 Numeral systems Numeral systems are writing systems for expressing numbers. The most commonly used numeral system is the positional system. Here a numeral is written as a series of digits ak in a base B, where ak = 0; 1; :::; B − 1. The number N represented by the numeral is given by X k N = akB (1.1) k The digits used to denote numbers are those of the arabic numerals for bases smaller or equal to ten. Thus the symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. For larger bases letters are used in addition to arabic numerals. For example, the digits used in hexedecimal notation (B = 16) are the arabic digits together with the symbols A, B, C, D, E and F . In case when it is unclear from context in what base a numeral is written a subscript with the base number is usually added.
Recommended publications
  • Chapter 5 Dimensional Analysis and Similarity
    Chapter 5 Dimensional Analysis and Similarity Motivation. In this chapter we discuss the planning, presentation, and interpretation of experimental data. We shall try to convince you that such data are best presented in dimensionless form. Experiments which might result in tables of output, or even mul- tiple volumes of tables, might be reduced to a single set of curves—or even a single curve—when suitably nondimensionalized. The technique for doing this is dimensional analysis. Chapter 3 presented gross control-volume balances of mass, momentum, and en- ergy which led to estimates of global parameters: mass flow, force, torque, total heat transfer. Chapter 4 presented infinitesimal balances which led to the basic partial dif- ferential equations of fluid flow and some particular solutions. These two chapters cov- ered analytical techniques, which are limited to fairly simple geometries and well- defined boundary conditions. Probably one-third of fluid-flow problems can be attacked in this analytical or theoretical manner. The other two-thirds of all fluid problems are too complex, both geometrically and physically, to be solved analytically. They must be tested by experiment. Their behav- ior is reported as experimental data. Such data are much more useful if they are ex- pressed in compact, economic form. Graphs are especially useful, since tabulated data cannot be absorbed, nor can the trends and rates of change be observed, by most en- gineering eyes. These are the motivations for dimensional analysis. The technique is traditional in fluid mechanics and is useful in all engineering and physical sciences, with notable uses also seen in the biological and social sciences.
    [Show full text]
  • Dimensional Analysis of Models and Data Sets: Similarity Solutions and Scaling Analysis
    Dimensional Analysis of Models and Data Sets: Similarity Solutions and Scaling Analysis 40 30 20 Tension, N 10 0 0 0.5 1 1.5 2 2.5 3 3.5 4 time, seconds φ = 0.2 o 2 φ = 1.0 o 1.5 1 Tension/Mg 0.5 0 0 2 4 6 8 10 12 time/(L/g)1/2 James F. Price Woods Hole Oceanographic Institution Woods Hole, Massachusetts, 02543 August 3, 2006 Summary: This essay describes a three-step procedure of dimensional analysis that can be applied to all quantitative models and data sets. In rare but important cases the result of dimensional analysis will be a solution; more often the result is an efficient way to display a large or complex data set. The first step of an analysis is to define an appropriate physical model, which is nothing more than a list of the dependent variable and all of the independent variables and parameters that are thought to be significant. The premise of dimensional analysis is that a complete equation made from this list of variables will be independent of the choice of units. This leads to the second step, calculation of a null space basis of the corresponding dimensional matrix (a computer code is made available for this calculation). To each vector 1 of the null space basis there corresponds a nondimensional variable, the number of which is less than the number of dimensional variables. The nondimensional variables are themselves a basis set and in most cases their form is not determined by dimensional analysis alone.
    [Show full text]
  • Parametric Study of Magnetic Pendulum
    Parametric Study of Magnetic Pendulum Author: Peter DelCioppo Persistent link: http://hdl.handle.net/2345/564 This work is posted on eScholarship@BC, Boston College University Libraries. Boston College Electronic Thesis or Dissertation, 2007 Copyright is held by the author, with all rights reserved, unless otherwise noted. Parametric Study of Magnetic Pendulum Boston College College of Arts and Sciences Honors Program Senior Thesis Project By Peter DelCioppo Advisor: Dr. Andrzej Herczynski, Physics Department Submitted May 2007 Table of Contents I. Genesis of Project…………………………………………………………………...p. 2 II Survey of Existing Literature…………………………………………………...…p. 2 III. Experimental Design……………………………………………………………...p. 3 IV. Theoretical Analysis………………………………………………………………p. 6 V. Calibration of Experimental Apparatus………………………………………….p. 8 VI. Experimental Results…………………………………………………………....p. 12 VII. Summary………………………………………………………………………..p. 15 VIII. References……………………………………………………………………...p. 17 - 1 - I. Genesis of Project This thesis project has been selected as an extension of experiments and research performed as part of the Spring 2006 Introduction to Chaos & Nonlinear Dynamics course (PH545). The current work particularly relates to experimental work analyzing the dynamics of the double well chaotic pendulum and a final project surveying the magnetic pendulum. In the experimental work, a basic understanding of the chaotic pendulum was developed, while the final project included a survey of the basic components of a magnetic pendulum system with particular
    [Show full text]
  • A High-Order Boris Integrator
    A high-order Boris integrator Mathias Winkela,∗, Robert Speckb,a, Daniel Ruprechta aInstitute of Computational Science, University of Lugano, Switzerland. bJ¨ulichSupercomputing Centre, Forschungszentrum J¨ulich,Germany. Abstract This work introduces the high-order Boris-SDC method for integrating the equations of motion for electrically charged particles in an electric and magnetic field. Boris-SDC relies on a combination of the Boris-integrator with spectral deferred corrections (SDC). SDC can be considered as preconditioned Picard iteration to com- pute the stages of a collocation method. In this interpretation, inverting the preconditioner corresponds to a sweep with a low-order method. In Boris-SDC, the Boris method, a second-order Lorentz force integrator based on velocity-Verlet, is used as a sweeper/preconditioner. The presented method provides a generic way to extend the classical Boris integrator, which is widely used in essentially all particle-based plasma physics simulations involving magnetic fields, to a high-order method. Stability, convergence order and conserva- tion properties of the method are demonstrated for different simulation setups. Boris-SDC reproduces the expected high order of convergence for a single particle and for the center-of-mass of a particle cloud in a Penning trap and shows good long-term energy stability. Keywords: Boris integrator, time integration, magnetic field, high-order, spectral deferred corrections (SDC), collocation method 1. Introduction Often when modeling phenomena in plasma physics, for example particle dynamics in fusion vessels or particle accelerators, an externally applied magnetic field is vital to confine the particles in the physical device [1, 2]. In many cases, such as instabilities [3] and high-intensity laser plasma interaction [4], the magnetic field even governs the microscopic evolution and drives the phenomena to be studied.
    [Show full text]
  • Vibration Odes 1
    Vibration ODEs 1 Vibration problems lead to differential equations with solutions that oscillate in time, typically in a damped or undamped sinusoidal fashion. Such solutions put certain demands on the numerical methods compared to other phenomena whose solutions are monotone or very smooth. Both the frequency and amplitude of the oscillations need to be accurately handled by the numerical schemes. The forthcom- ing text presents a range of different methods, from classical ones (Runge-Kutta and midpoint/Crank-Nicolson methods), to more modern and popular symplectic (ge- ometric) integration schemes (Leapfrog, Euler-Cromer, and Störmer-Verlet meth- ods), but with a clear emphasis on the latter. Vibration problems occur throughout mechanics and physics, but the methods discussed in this text are also fundamen- tal for constructing successful algorithms for partial differential equations of wave nature in multiple spatial dimensions. 1.1 Finite Difference Discretization Many of the numerical challenges faced when computing oscillatory solutions to ODEs and PDEs can be captured by the very simple ODE u00 C u D 0. This ODE is thus chosen as our starting point for method development, implementation, and analysis. 1.1.1 A Basic Model for Vibrations The simplest model of a vibrating mechanical system has the following form: u00 C !2u D 0; u.0/ D I; u0.0/ D 0; t 2 .0; T : (1.1) Here, ! and I are given constants. Section 1.12.1 derives (1.1) from physical prin- ciples and explains what the constants mean. The exact solution of (1.1)is u.t/ D I cos.!t/ : (1.2) © The Author(s) 2017 1 H.P.
    [Show full text]
  • Dimensional Analysis and Modeling
    cen72367_ch07.qxd 10/29/04 2:27 PM Page 269 CHAPTER DIMENSIONAL ANALYSIS 7 AND MODELING n this chapter, we first review the concepts of dimensions and units. We then review the fundamental principle of dimensional homogeneity, and OBJECTIVES Ishow how it is applied to equations in order to nondimensionalize them When you finish reading this chapter, you and to identify dimensionless groups. We discuss the concept of similarity should be able to between a model and a prototype. We also describe a powerful tool for engi- I Develop a better understanding neers and scientists called dimensional analysis, in which the combination of dimensions, units, and of dimensional variables, nondimensional variables, and dimensional con- dimensional homogeneity of equations stants into nondimensional parameters reduces the number of necessary I Understand the numerous independent parameters in a problem. We present a step-by-step method for benefits of dimensional analysis obtaining these nondimensional parameters, called the method of repeating I Know how to use the method of variables, which is based solely on the dimensions of the variables and con- repeating variables to identify stants. Finally, we apply this technique to several practical problems to illus- nondimensional parameters trate both its utility and its limitations. I Understand the concept of dynamic similarity and how to apply it to experimental modeling 269 cen72367_ch07.qxd 10/29/04 2:27 PM Page 270 270 FLUID MECHANICS Length 7–1 I DIMENSIONS AND UNITS 3.2 cm A dimension is a measure of a physical quantity (without numerical val- ues), while a unit is a way to assign a number to that dimension.
    [Show full text]
  • A Position Based Approach to Ragdoll Simulation
    LINKÖPING UNIVERSITY Department of Electrical Engineering Master Thesis A Position Based Approach to Ragdoll Simulation Fiammetta Pascucci LITH-ISY-EX- -07/3966- -SE June 2007 LINKÖPING UNIVERSITY Department of Electrical Engineering Master Thesis A position Based Approach to Ragdoll Simulation Fiammetta Pascucci LITH-ISY-EX- -07/3966- -SE June 2007 Supervisor: Ingemar Ragnemalm Examinator: Ingemar Ragnemalm Abstract Create the realistic motion of a character is a very complicated work. This thesis aims to create interactive animation for characters in three dimen- sions using position based approach. Our character is pictured from ragdoll, which is a structure of system particles where all particles are linked by equidistance con- straints. The goal of this thesis is observed the fall in the space of our ragdoll after creating all constraints, as structure, contact and environment constraints. The structure constraint represents all joint constraints which have one, two or three Degree of Freedom (DOF). The contact constraints are represented by collisions between our ragdoll and other objects in the space. Finally, the environment constraints are represented by means of the wall con- straint. The achieved results allow to have a realist fall of our ragdoll in the space. Keywords: Particle System, Verlet’s Integration, Skeleton Animation, Joint Con- straint, Environment Constraint, Skinning, Collision Detection. Acknowledgments I would to thanks all peoples who aid on making my master thesis work. In particular, thanks a lot to the person that most of all has believed in me. This person has always encouraged to go forward, has always given a lot love and help me in difficult movement.
    [Show full text]
  • Exponential Integration for Hamiltonian Monte Carlo
    Exponential Integration for Hamiltonian Monte Carlo Wei-Lun Chao1 [email protected] Justin Solomon2 [email protected] Dominik L. Michels2 [email protected] Fei Sha1 [email protected] 1Department of Computer Science, University of Southern California, Los Angeles, CA 90089 2Department of Computer Science, Stanford University, 353 Serra Mall, Stanford, California 94305 USA Abstract butions that generate random walks in sample space. A fraction of these walks aligned with the target distribution is We investigate numerical integration of ordinary kept, while the remainder is discarded. Sampling efficiency differential equations (ODEs) for Hamiltonian and quality depends critically on the proposal distribution. Monte Carlo (HMC). High-quality integration is For this reason, designing good proposals has long been a crucial for designing efficient and effective pro- subject of intensive research. posals for HMC. While the standard method is leapfrog (Stormer-Verlet)¨ integration, we propose For distributions over continuous variables, Hamiltonian the use of an exponential integrator, which is Monte Carlo (HMC) is a state-of-the-art sampler using clas- robust to stiff ODEs with highly-oscillatory com- sical mechanics to generate proposal distributions (Neal, ponents. This oscillation is difficult to reproduce 2011). The method starts by introducing auxiliary sam- using leapfrog integration, even with carefully pling variables. It then treats the negative log density of selected integration parameters and precondition- the variables’ joint distribution as the Hamiltonian of parti- ing. Concretely, we use a Gaussian distribution cles moving in sample space. Final positions on the motion approximation to segregate stiff components of trajectories are used as proposals. the ODE.
    [Show full text]
  • Simple Quantitative Tests to Validate Sampling from Thermodynamic
    Simple quantitative tests to validate sampling from thermodynamic ensembles Michael R. Shirts∗ Department of Chemical Engineering, University of Virginia, VA 22904 E-mail: [email protected] Abstract It is often difficult to quantitatively determine if a new molecular simulation algorithm or software properly implements sampling of the desired thermodynamic ensemble. We present some simple statistical analysis procedures to allow sensitive determination of whether a de- sired thermodynamic ensemble is properly sampled. We demonstrate the utility of these tests for model systems and for molecular dynamics simulations in a range of situations, includ- ing constant volume and constant pressure simulations, and describe an implementation of the tests designed for end users. 1 Introduction Molecular simulations, including both molecular dynamics (MD) and Monte Carlo (MC) tech- arXiv:1208.0910v1 [cond-mat.stat-mech] 4 Aug 2012 niques, are powerful tools to study the properties of complex molecular systems. When used to specifically study thermodynamics of such systems, rather than dynamics, the primary goal of molecular simulation is to generate uncorrelated samples from the appropriate ensemble as effi- ciently as possible. This simulation data can then be used to compute thermodynamic properties ∗To whom correspondence should be addressed 1 of interest. Simulations of several different ensembles may be required to simulate some thermo- dynamic properties, such as free energy differences between states. An ever-expanding number of techniques have been proposed to perform more and more sophisticated sampling from com- plex molecular systems using both MD and MC, and new software tools are continually being introduced in order to implement these algorithms and to take advantage of advances in hardware architecture and programming languages.
    [Show full text]
  • Dimensional Analysis and Modeling
    cen72367_ch07.qxd 10/29/04 2:27 PM Page 269 CHAPTER DIMENSIONAL ANALYSIS 7 AND MODELING n this chapter, we first review the concepts of dimensions and units. We then review the fundamental principle of dimensional homogeneity, and OBJECTIVES Ishow how it is applied to equations in order to nondimensionalize them When you finish reading this chapter, you and to identify dimensionless groups. We discuss the concept of similarity should be able to between a model and a prototype. We also describe a powerful tool for engi- ■ Develop a better understanding neers and scientists called dimensional analysis, in which the combination of dimensions, units, and of dimensional variables, nondimensional variables, and dimensional con- dimensional homogeneity of equations stants into nondimensional parameters reduces the number of necessary ■ Understand the numerous independent parameters in a problem. We present a step-by-step method for benefits of dimensional analysis obtaining these nondimensional parameters, called the method of repeating ■ Know how to use the method of variables, which is based solely on the dimensions of the variables and con- repeating variables to identify stants. Finally, we apply this technique to several practical problems to illus- nondimensional parameters trate both its utility and its limitations. ■ Understand the concept of dynamic similarity and how to apply it to experimental modeling 269 cen72367_ch07.qxd 10/29/04 2:27 PM Page 270 270 FLUID MECHANICS Length 7–1 ■ DIMENSIONS AND UNITS 3.2 cm A dimension is a measure of a physical quantity (without numerical val- ues), while a unit is a way to assign a number to that dimension.
    [Show full text]
  • Transport Properties of Fluids: Symplectic Integrators and Their
    Fluid Phase Equilibria 183–184 (2001) 351–361 Transport properties of fluids: symplectic integrators and their usefulness J. Ratanapisit a,b, D.J. Isbister c, J.F. Ely b,∗ a Chemical Engineering and Petroleum Refining Department, Colorado School of Mines, Golden, CO 80401, USA b Department of Chemical Engineering, Prince of Songla University, Hat-Yai, Songkla 90110, Thailand c School of Physics, University College, University of New South Wales, ADFA, Canberra, ACT 2600, Australia Abstract An investigation has been carried out into the effectiveness of using symplectic/operator splitting generated algorithms for the evaluation of transport coefficients in Lennard–Jones fluids. Equilibrium molecular dynamics is used to revisit the Green–Kubo calculation of these transport coefficients through integration of the appropriate correlation functions. In particular, an extensive series of equilibrium molecular dynamic simulations have been per- formed to investigate the accuracy, stability and efficiency of second-order explicit symplectic integrators: position Verlet, velocity Verlet, and the McLauchlan–Atela algorithms. Comparisons are made to nonsymplectic integrators that include the fourth-order Runge–Kutta and fourth-order Gear predictor–corrector methods. These comparisons were performed based on several transport properties of Lennard–Jones fluids: self-diffusion, shear viscosity and thermal conductivity. Because transport properties involve long time simulations to obtain accurate evaluations of their numerical values, they provide an excellent basis to study the accuracy and stability of the SI methods. To our knowledge, previous studies on the SIs have only looked at the thermodynamic energy using a simple model fluid. This study presents realistic, but perhaps the simplest simulations possible to test the effect of the integrators on the three main transport properties.
    [Show full text]
  • Verlet with Collisions for Mass Spring Model Simulations
    Verlet with Collisions for Mass Spring Model Simulations Maciej Kot1 and Hiroshi Nagahashi2 1Imaging Science and Engineering Laboratory, Tokyo Institute of Technology, Tokyo, Japan 2Laboratory for Future Interdisciplinary Research of Science and Technology, Tokyo Institute of Technology, Tokyo, Japan Keywords: Mass Spring Models, Deformable Objects, Collisions, Verlet, Friction. Abstract: In this paper we study the problem of the interaction of soft bodies modeled with mass spring models (MSM) and static elements of the environment. We show that in such setup it is possible to couple standard time evolution of MSMs with collision responses in a way, that does not require complex processing for multi collision situations while successfully preventing object inter-penetration. Moreover we show how to achieve similar energy dissipation for models with different resolutions when the friction is present. 1 INTRODUCTION ulation and we show how to couple it with collision responses. One of our goals is to design a collision Mass spring models are a popular choice for the rep- handling technique which preserves the energy of the resentation of soft bodies in computer graphics and system (affects stability of the simulation), prevents virtual reality applications. For a long time they were object penetration, and if the friction is present, obeys preferred over the finite element method (FEM) in the Newton’s law of dry friction. We achieve this goal real time applications, as they tend to offer better completely for collisions between MSM and static el- computational efficiency (although recent FEM im- ements of the environment and partially for MSM- plementations are quite fast as well (Sin et al., 2013)), MSM collisions; in case of MSM-MSM collisions our but they are believed to be less accurate in terms of method does not preserve energy in certain situations, physical plausibility (Nealen et al., 2006).
    [Show full text]