Closed czajah closed 3 years ago
Ciao! The parameters you are using look weird to me. Can you give us what you is your reference angular frequency in SI units, and to what scale it corresponds to in your problem (electron skin depth, wavelength of an electromagnetic wave, or whatever). Also, what would be the characteristic Debye length of the plasma you use as a seed, and/or the plasma you expect to get by the end of your simulation?
@MickaelGrech
Sorry, I gave wrong sim dimmension 1cm x 3cm actually it is 1cm x 2cm.
It's just pilot simulation to check how collisional ionization works. I want to check how the collisional ionization depends on density and temperature of neutrals and maybe external electric field.
reference_angular_frequency_SI: 1000000000000.0 hertz
number_density : 10000000000000.0 / centimeter ** 3 eon temperature : 1 kiloeV ion temperature : 0.01 kiloeV Wp : 178447213442.43182 hertz L_debye : 0.07433941996724053 millimeter cell_length : 0.07433941996724053 millimeter
time_step : 0.15780689576746915 picosecond simulation_time : 5.000000000000001e-07 millisecond simulation_steps : 3169
x_simulation_cells : 136 y_simulation_cells : 272
EM_boundary_conditions : [['periodic', 'periodic'], ['silver-muller', 'silver-muller']] boundary_conditions : [['periodic', 'periodic'], ['remove', 'remove']] macroparticles_per_cell : 16
Ey : 30.0 kilovolt / centimeter
The charge should be conserved during ionization. Have you verified ?
There can be a number of instabilities if you do not have enough particles per cell for instance.
@mccoys charge is conserved (based on "q" attribute from TrackParticles diagnostics). I'll try with increased number of particles per cell
When charge is conserved, I mean the total charge. The q
of an ion should change.
When charge is conserved, I mean the total charge. The
q
of an ion should change.
The 'q' of an ion is changing. At the end of simulation the sum of 'q' for N_zero is equal to -1 * sum of 'q' for 'eon'
I could not go through all the parameters in your namelist, but I've checked a few and they look fine (no CFL violation or obvious mistake in your normalisation). However, your neutral plasma is very dense and if collisional ionization does lead to it being effectively ionized, you will get a very dense quite cold plasma. As a consequence, your resolution will not be sufficient to resolve the Debye length associated to this dense and cold plasma, and numerical heating will kick in. You should check the evolution of the electric field in your simulation, and most important, the total energy and energy balance (from Scalar diagnostics).
@czajah please let us know if the change of particles per cell or the change of resolution helped.
@mccoys ok, I've been doing something else for the past few days but I'm just sitting down to this problem
@mccoys I've tried 16, 32, 64 particles per cell and cell length 1, 0.5, 0.2 Debye length with no visible change in observed effect (bubbles). Pictures bellow are for 64 particles per cell and cell length 1 Debye length after 0.5ns.
Cells with electrons created by ionnization:
Number of particles per cell:
Maximum electric field at particle position in particular cells in Er units:
Energy is well conserved.
It looks like new electrons create a space-charge field that removes other electrons. What does the total density look like ?
@mccoys for me it looks like cells in which ionization occured suck in other electrons. Look at the picture with "Number of particles per cell". In the center of bubbles you can see cells with a very high number of particles up to a thousand.
Number density of neutral gas is 1e18 particles/cm3 Number density of seed plasma is 1e13 particles/cm3
Do you have a plot of total charge density ?
Do you have a plot of total charge density ?
@mccoys not yet. Give me a minute
@mccoys Sum of the charge per cell. Is that what you asked for?
I asked for the charge density. What did you compute ? Maybe the easier way would be for you to send your input file. Is it possible ?
@mccoys
I asked for the charge density. What did you compute ?
I've summed charges ('q') of all species in particular cells. So it's total charge per cell.
Maybe the easier way would be for you to send your input file. Is it possible ?
I've to clean it a bit first because it is generated from template and uses my local libraries
I've summed charges ('q') of all species in particular cells. So it's total charge per cell.
It should be the sum of charge*weight. Why don't you directly use the happi
tool ?
S.Field(0,"Rho").plot
. That's it
EDIT: You should actually include either Field or Probe diagnostics in your simulation. It helps a lot.
@mccoys
Input file:
Another input file for the explosion case from my first post:
You should actually include either Field or Probe diagnostics in your simulation. It helps a lot.
At some point more convienient for me was using TrackParticles diagnostics with chargeless "probe particles" and I used to just checking fields at particle positions.
@mccoys
When I calculated charge*weight charge density start to look normal. I'm confused because I thought that particle weights after initialisation remains constant during whole simulation.
EDIT: ok, now I understand my mistake. I feel so stupid. Anyway I can't wait to understand what I did wrong in case of explosion
@czajah Thanks to your input file, I have found a small bug in collisional ionization. The new electrons are not set exactly at the ion position so that there is a space charge created. I will push a fix soon.
@czajah The bug should be fixed in the lastest commit available here on github (master branch). Please report back when you have checked whether it works or not.
@mccoys
I already did something like this fix but with hardcoded idim for my 2d geometry and I found new problem:
#3 Object "./smilei", at 0x558a8b8d255e, in
#2 Object "./smilei", at 0x558a8b858c19, in VectorPatch::applyCollisions(Params&, int, Timers&)
#1 Object "./smilei", at 0x558a8b67b9a7, in Collisions::collide(Params&, Patch*, int, std::vector<Diagnostic*, std::allocator<Diagnostic*> >&)
#0 Object "./smilei", at 0x558a8b824590, in Patch2D::getPrimalCellVolume(Particles*, unsigned int, Params&)
Segmentation fault (Address not mapped to object [(nil)])
It happens when there is like a dozen new electrons created. When I use number_of_patches=[1,1] it works without crash.
Well, it looks like you have changed something in the arrays that should not be changed. I recommend you use my patch. Otherwise let me look at your changes.
@mccoys
I'll pull your patch later.
Mine fix:
new_electrons.Momentum[0].back() *= pr;
new_electrons.Momentum[1].back() *= pr;
new_electrons.Momentum[2].back() *= pr;
cout <<"p"<<endl;
new_electrons.Position[0].back() = pi->position(0, ii);
cout<<"p0"<<endl;
new_electrons.Position[1].back() = pi->position(1, ii);
cout<<"p1"<<endl;
// new_electrons.Position[2].back() = pi->position(2, ii);
// cout<<"p2"<<endl;
cout<<"popopo"<<endl;
// Correction for moving back to the lab frame
pr = w+1. - pr*gamma_s;
new_electrons.Momentum[0].back() += pr * pi->momentum( 0, ii );
Right now I'm plaing with some other aspects of ionization code.
@mccoys I have your version but unfortunately simulation still blows up :(
It does not not blow up when I run it. What exactly does it do ?
@mccoys
What exactly does it do ?
Energy rise thousands times.
Electric field at particles positions around newly created ion-electron pairs is still hundreds times bigger than average.
I have questions about code in CollisionalIonization.cpp
1)
F. Pérez et al., Phys. Plasmas 19, 083104 (2012) describes two cases We >= Wi and We < Wi
This (line 280):
// Lose incident electron energy
if( U2 < Wi/We ) {
looks like part of We >= Wi case but then where is ionization?
And this (line 255):
// Ionize the atom and create electron
if( U2 < We/Wi ) {
looks like part of We < Wi case but then where is slowing down part?
2)
Why Zstar is always incremented (line 299) even if ionization haven't occured?
I cannot reproduce the blowing up. Are you sure you recompiled and run properly?
You have inverted the two cases, but is that the issue you have?
Zstar, here, is not the actual ion charge. It is used to test the cumulative ionisation probability for each charge state. The ion is not always ionised (only when U2 < We/Wi) because it is a Monte Carlo approach to particles having different weights. It is true that the order of loops and ifs is not optimal here
@mccoys
I'm sure I recompiled and run properly.
It looks like I'm doing here something wrong. I think we can close this issue. Thanks for help!
Hi,
I'm trying to run 2d simulation of the streamer formation. As first attempt I've created simulation with space filled by neutral species with n = 1e18 particles per cm^3 and at the center I placed "seed" fully ionized plasma with density 1e13 particles per cm^3. What i observed is strange (for me) behaviour of "seed" electrons around newly created ion-electron pairs. It looks like they are blowed out. In the picture below you can see "bubbles" and inside them pairs of newly created ions and electrons pairs marked by red and green pixels respectively (black is for "seed" electrons).
It looks for me like maybe EM fields are calculated respecting newly created electrons but not taking into account changed charges of ions? What do you think?
Dimmensions of the simulation are 1cm x 3cm and the picture show the state after 0.5ns
Also sometimes ionization "explodes". Images below shows newly created ions and electrons (black and red respectively) after 47ps, 79ps and 110ps
47ps
79ps
110ps
What I'm doing wrong?
Simulation parameters:
Neutral species:
Seed plasma ions:
Seed plasma electrons:
Species for newly created electrons:
Collisions setup:
Smilei version: bv4.4-796-g9cb8dd39-bmaster
Initialization log: