Code construction – 3: Computation of source terms. The data of source terms is prepared on grid points of the spherical coordinate (r, ,  ), and it.

Slides:



Advertisements
Similar presentations
Isoparametric Elements Element Stiffness Matrices
Advertisements

1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
Lecture 18 - Numerical Differentiation
ECIV 720 A Advanced Structural Mechanics and Analysis
Lecture 3 Jack Tanabe Old Dominion University Hampton, VA January 2011 Conformal Mapping.
ECIV 720 A Advanced Structural Mechanics and Analysis
Isoparametric Elements Element Stiffness Matrices
12/21/2001Numerical methods in continuum mechanics1 Continuum Mechanics On the scale of the object to be studied the density and other fluid properties.
Lecture 3 The Debye theory. Gases and polar molecules in non-polar solvent. The reaction field of a non-polarizable point dipole The internal and the direction.
MANE 4240 & CIVL 4240 Introduction to Finite Elements Numerical Integration in 1D Prof. Suvranu De.
Gradient Methods May Preview Background Steepest Descent Conjugate Gradient.
Caracas, Marzo 2006 Algorithm for 3D-Modeling H.-J. Götze IfG, Christian-Albrechts-Universität Kiel Interpretation Interpretation.
Support Vector Machines
Multistep methods previous methods use information at xi to predict yi+1 multistep methods use information from xi-1, xi-2, etc. leads to better results.
Method to Use Conservations Laws in Fluid Flows…… P M V Subbarao Professor Mechanical Engineering Department I I T Delhi Mathematics of Reynolds Transport.
Subdivision Analysis via JSR We already know the z-transform formulation of schemes: To check if the scheme generates a continuous limit curve ( the scheme.
Quadrature Greg Beckham. Quadrature Numerical Integration Goal is to obtain the integral with as few computations of the integrand as possible.
ELEN 3371 Electromagnetics Fall Lecture 2: Review of Vector Calculus Instructor: Dr. Gleb V. Tcheslavski Contact:
SIMULATION PROGRESS AND PLANS AT ROSTOCK/DESY Aleksandar Markovic ECL2, CERN, March 1, 2007 Gisela Pöplau.
Modern Navigation Thomas Herring MW 11:00-12:30 Room
Boyce/DiPrima 9th ed, Ch 8.4: Multistep Methods Elementary Differential Equations and Boundary Value Problems, 9th edition, by William E. Boyce and Richard.
1 Chapter 5 Numerical Integration. 2 A Review of the Definite Integral.
3. Numerical integration (Numerical quadrature) .
Lecture 4: Boundary Value Problems
CMPS1371 Introduction to Computing for Engineers NUMERICAL METHODS.
UNIVERSITI MALAYSIA PERLIS
Mathematics for Computer Graphics (Appendix A) Won-Ki Jeong.
Simpson Rule For Integration.
Solving the Poisson Integral for the gravitational potential using the convolution theorem Eduard Vorobyov Institute for Computational Astrophysics.
Chapter 9: Differential Analysis of Fluid Flow SCHOOL OF BIOPROCESS ENGINEERING, UNIVERSITI MALAYSIA PERLIS.
Short introduction for the quasi-equilibrium binary neutron star solutions. Introducing two patches of fluid coordinate grids, the initial data code can.
Scientific Computing Partial Differential Equations Poisson Equation.
Numerical Methods Part: Simpson Rule For Integration.
Lecture Fall 2001 Physically Based Animation Ordinary Differential Equations Particle Dynamics Rigid-Body Dynamics Collisions.
6. Introduction to Spectral method. Finite difference method – approximate a function locally using lower order interpolating polynomials. Spectral method.
Indo-European network on Advanced Instability Methods Sensitivity and Adjoint operators: a simple matlab example (the discrete adjoint approach)‏
3.3.3: Semi-Lagrangian schemes AOSC614 class Hong Li.
Stable, Circulation- Preserving, Simplicial Fluids Sharif Elcott, Yiying Tong, Eva Kanso, Peter Schröder, and Mathieu Desbrun.
Serge Andrianov Theory of Symplectic Formalism for Spin-Orbit Tracking Institute for Nuclear Physics Forschungszentrum Juelich Saint-Petersburg State University,
Unit 1 – Conic Sections Section 1.2 – The Circle Calculator Required.
Solving an elliptic PDE using finite differences Numerical Methods for PDEs Spring 2007 Jim E. Jones.
Chap. 11 Numerical Differentiation and Integration
Computer Graphics Rendering 2D Geometry CO2409 Computer Graphics Week 2.
Code construction – 1: coordinate grid points and relating parts. Generate coordinate grid points for the spherical coordinate (r, ,  ), and tables for.
Interactive Graphics Lecture 10: Slide 1 Interactive Computer Graphics Lecture 10 Introduction to Surface Construction.
Derivatives of Trigonometric Functions. 2 Derivative Definitions We can now use the limit of the difference quotient and the sum/difference formulas.
Understanding the difference between an engineer and a scientist There are many similarities and differences.
Basic Geometric Nonlinearities Chapter Five - APPENDIX.
X = 2 + t y = t t = x – 2 t = (y + 3)/2 x – 2 = y x – 4 = y + 3 y – 2x + 7 = 0 Finding the Cartesian Equation from a vector equation x = 2.
CSE 330 Numerical Methods Lecture 05 Chapter 5: Numerical Differentiation Md. Omar Faruqe
Vectors – Ch 11. What do you know? The basics … A B 6 3 a or a Column vector –a–a Negative of a vector a A B A B.
Answers for Review Questions for Lectures 1-4. Review Lectures 1-4 Problems Question 2. Derive a closed form for the estimate of the solution of the equation.
Code construction – 4: Surface fitted coordinate for the fluid and hydrostatic eq. On top of the spherical coordinates for the field (r, ,  ), we introduce.
CHAPTER 3 NUMERICAL METHODS
TOPIC : 7 NUMERICAL METHOD.
Introduction to the Finite Element Method
d-Fold Hermite-Gauss Quadrature and Computation of Special Functions
Quick Review 2012 Pearson Education, Inc..
Use the Midpoint Rule with n = 10 to approximate the integral
NUMERICAL INTEGRATION
Outline Derivatives and transforms of potential fields
VECTOR CALCULUS - Line Integrals,Curl & Gradient
SKTN 2393 Numerical Methods for Nuclear Engineers
topic11_shocktube_problem
-4 is the y-value or the function value.
Question 27.
Lecture 16 Gradient in Cartesian Coordinates
Chapter 2 A Survey of Simple Methods and Tools
Numerical Integration
Presentation transcript:

Code construction – 3: Computation of source terms. The data of source terms is prepared on grid points of the spherical coordinate (r, ,  ), and it is passed to the Poisson solver. Choice of grid points for the source may depend on what kind of numerical integration formula is used. Our choice is the mid-point rule. We have prepared the mid point grids as (hrg(irg), hthg(itg), hphig(ipg)). However, the field values { , ,  a } are not defined on these grids. We need to interpolate these field values on the grid points (rg(irg), thg(itg), phig(ipg)) to the mid-points (hrg(irg), hthg(itg), hphig(ipg)). Remark: If one chose another numerical integration formula, make sure that the weight for integration is chosen correctly for non-equidistant grids.

Close look at the source terms. Computation of source terms include evaluations of following quantities at the mid-point grids (when the mid-point quadrature formula is applied) (1) the field values, (2) its first derivatives, and (3) the fluid source terms. Computation goes as follows (1) compute (2) interpolate fluid terms to grid points. (3) compute sources. Vectors and tensors have Cartesian components, such as {  x,  y,  z }.

A linear interpolation formula is chosen to interpolate { , ,  a } on the grid (rg(irg), thg(itg), phig(ipg)) to the mid-points (hrg(irg), hthg(itg), hphig(ipg)). Since this has a simple geometry, the formula has a simple form. A linear interpolating polynomial is used for most of the cases. (This is 2 nd order accurate.) For some cases higher order (such as 4 th order) interpolating polynomial is preferable. (It is often nice to use it, when grid points to be interpolated are finer than the original grid points.) A few types of interpolation are necessary during the calculations of the sources. We make a subroutine, or a function for this. ° Interpolations r  

First find a position of the grid (hrg(irg), hthg(itg), hphig(ipg)) in the fluid coordinate (rf(irf), thf(itf), phif(ipf)), then apply a linear interpolating polynomials. A linear interpolating polynomial is used for most of the cases. (This is 2 nd order accurate.) Interpolation from the fluid coordinate to the field coordinate. Interpolation from the field coordinate to the fluid coordinate. For a single star case, only the interpolation in r-coordinate is required. (   coordinate grids are the same for the fluid and the field.) Higher order interpolating polynomial may be preferable. See the last page of this slide set. r  

To compute the gradients of { , ,  a } at the mid-points (hrg(irg), hthg(itg), hphig(ipg)) using the values at grids (rg(irg), thg(itg), phig(ipg)), the following procedure is used. ° Gradient on the field coordinate grids. Then “rotate”, Evaluated at mid-point (hrg(irg), hthg(itg), hphig(ipg)). r  

end subroutine iteration Source terms of each equations are calculated in a separated subroutine. call sourceterm_hc(sou_psi) call poisson_solver(sou_psi,pots) call sourceterm_spatialtr(sou_alps) call update_grfield(pot,psi) call poisson_solver(sou_alps,pots) call update_grfield(pot,alps) subroutine iteration call extrinsic_curvature call interpolate_fluid_to_grav Then, computation of the fluid comes here. call sourceterm_momc(sou_bxyzs) call poisson_solver(sou_bx,potx) call update_grfield() £ 4 call poisson_solver(sou_by,poty) call poisson_solver(sou_bz,potz) call poisson_solver(sou_bs,pots) call compute_shift

Definitions of the coordinates for the gravitational and the fluid matter are given in the other slides. subroutine interpolate_fluid_to_grav end subroutine interpolate_fluid_to_grav This formula gives a neutron star radius corresponds to the mid-point hthg(itg), hphig(ipg), itf = itg, ipf = ipg. Therefore hrg(irg)/hR(itg,ipg) is the radial coordinate of the mid-point of the gravitational coordinate grid in the fulid coordinate grid point. Use values of f(i,j,k) at the coordinate (rf(i), thf(j), phif(k)) at i = irf, irf-1, j = itf, itf-1, k = ipf, ipf-1 (8 points), and make 3D linear interpolation to the (mid) point (r, ,  ) = (hrg(irg)/hR(itg,ipg), hthg(itg), hphig(ipg)), where hthg(itg) = hthf(itf), hphig(ipg) = hphif(ipf). (This is the same as mapping a mid-point of gravitaional coordinate grids to the fluid coordinate grids.)