Comments (2)
@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.
@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)
- External E/B field import from openPMD - Support multi-mode RZ
- External E/B field import from openPMD - Support 1D HOT 1
- support density reflection from non-periodic boundaries from deposition for RZ HOT 1
- Charge deposition in diagnostics doesn't take into account particles.deposit_on_main_grid HOT 1
- Possible wrong charge (and current) deposition at the edges in 2D-RZ HOT 13
- Document & Improve pml_psatd_dive_divb_cleaning
- Back_Transformed Diagnostics Syntaxes No Longer Supported HOT 2
- Back-Transformed Diagnostics Issue
- Problems of setting beams outside the window HOT 3
- `int_comp_names.size() == pc.NumIntComps() + NStructInt' failed HOT 1
- Dwarf Error: Can't find .debug_ranges section HOT 2
- Managed Memory Leftovers: MR Init, QED, Ionization HOT 4
- Inhomogeneous Neumann on EB? HOT 1
- PEC boundaries: Copy values in guard cells HOT 2
- Please delete the issue HOT 1
- Classical in-situ radiation computation HOT 5
- Laser envelope model HOT 1
- Legacy TXYE files no longer supported HOT 3
- Remove Harris laser?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from warpx.