Code Monkey home page Code Monkey logo

prime's Introduction

logo

License Python 3.6 Build Status Coverage Status

Prime is a python package that allows to derive the weak field Lagrangians of any geometry by the gravitational closure mechanism.

Overview

  • Easy to use setup for any input geometry
  • Complete automation from the geometry to the output
  • Modern technologies: Python 3 + Kubernetes for distributed computing

Note: Prime is in VERY early development stage. Its API and design is still fluctuating quantum style and its results are as trustable as from string theory.

Current Status

  • Reading of the input files
  • Calculation of the remaining input coefficients (E, F)
  • Perturbative expansion of the input coefficients
  • Generation of a list of all perturbative output coefficients
  • Generation of the basis terms of the perturbative output coefficients
  • Collecting all perturbative output coefficients into the polynomial in the degrees of freedom
  • Writing classes for all closure equations
  • Plugging all coefficients into the closure equations
  • Solving them
  • Fancy output of the whole Lagrangian

Installation

$ git clone https://github.com/florianwolz/prime
$ cd prime
$ pip install -r requirements.txt
$ pip install .

Usage

$ prime solve examples/metric.py

Prime ships with a command line interface. With the solvecommand you can solve an input script for a specific geometry.

Input scripts

Prime is configured with the help of a Python input script. Before explaining the several steps, let's start with an example:

import prime
from sympy import sqrt

# Setup the list of the six degrees of freedom
phis = prime.phis(6)

# Setup the (pulled-back) metric
g = prime.Field([[-1 + phis[0], phis[1], phis[2]],
                 [phis[1], -1 + phis[3], phis[4]],
                 [phis[2], phis[4], -1 + phis[5]]], [1, 1])

# Setup the parametrization
param = prime.Parametrization(fields=[g])

# Setup the kinematical coefficient
P = prime.Kinematical(param, components=g.components, degP=2)

# Solve
prime.solve(
    parametrization=param,
    kinematical_coefficient=P,

    # Linear equations of motion
    order=1
)

Executing this script will give the perturbative expansion of the Einstein-Hilbert action to second order.

All input scripts have more or less the same structure. It starts with the inclusion of the prime module and then one uses prime.phis(N) to get an array with the degrees of freedom properly setup. This is followed by the geometric fields in terms of the degrees of freedom, either by using the prime.Field class - or for complicated parametrizations in functional form with the help of the prime.field decorator. Then the parametrization can be setup.

Lastly, one enters the kinematical coefficient P and the normal deformation coefficient M and starts the solving process by calling prime.solve.

For further examples take a look into the examples/ directory, where the input scripts for a bi-metric theory and an area metric are provided.

Advanced topics

Gravitational Closure

Gravitational closure is a theoretical mechanism that allows to calculate the Lagrangian of a geometry by solving a system of linear homogeneous partial differential equations. These equations encode the requirement that matter theories that is coupled to this geometry can be formulated on common initial data surfaces -- i.e. allow a consistent predictive physical theory.

closure

Solving this system is practically quite complicated -- and fortunately practically often not even required. Instead one can already use a perturbative expansion around some constant background. This turns the system of partial differential equations into a huge linear algebra problem.

Prime tackles this problem by completely automating the process between the input data and the final Lagrangian.

License

Prime is released under the Apache 2.0 licence. See LICENSE

Crafted with ❤️ and lots of ☕ as part of my PhD thesis.

prime's People

Contributors

florianwolz avatar

Watchers

 avatar  avatar

prime's Issues

Proper output of the result

Prime needs to properly output the result of the calculations.
Right now the proper way to do so seems to output each cofficient C, C_A, C_AB, ... separately in terms of

C = (prefactor) * Intertwiner epsilon-gamma phis +
       ...

Thus, implement methods to output this for each basis terms in quasi-LaTeX form (up to manual pagebreak changes). Proposed function signature def toLaTeX(self, solution={}) in class OutputCoefficient.

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.