Giter VIP home page Giter VIP logo

Comments (2)

RemiLehe avatar RemiLehe commented on July 30, 2024 1

@Yin-YinjianZhao
I quickly looked at the code, and it seems that you could essentially remove the assert and run the code as is. The only trick is that, in this case, WarpX will interpret your Bx_expression/By_expression as Br/Bt and it will interpret x in the expression as r (y will be taken to be 0 by default).

So, for the azimuthal B field that you wanted to use, you should enter:

Bfield = picmi.AnalyticInitialField(
    Bx_expression = "0", 
    By_expression =  "(-2.5407392385349525e-4*x/0.00021277183540403992)",
    Bz_expression = "0")
sim.add_applied_field(Bfield)

However, this can be quite confusing for a general user. Which is why @ax3l was suggesting to modify the WarpX code so that the user needs to pass a function of r, z in the case where is compiled in RZ mode.

from warpx.

ax3l avatar ax3l commented on July 30, 2024

@RemiLehe and I discussed a potential first quick implementation.

Assumption: start with purely cylindrical (RZ) fields.

Naming: Er, Etheta, Ez all only depending on r,z (not yet theta).

Implementation: write into mode zero.

from warpx.

Related Issues (20)

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.