Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ballistic motion electrons #22

Open
KristienP opened this issue May 2, 2022 · 2 comments
Open

Ballistic motion electrons #22

KristienP opened this issue May 2, 2022 · 2 comments

Comments

@KristienP
Copy link

Hi!
Thanks for sharing this great code via GitHub!

I am trying to add the ballistic range electrons can move in the laser source term as in the following equation:
image

In this equation delta is the optical penetration depth and delta_b the ballistic range.
How can I include this ballistic range in the laser source term of the NTMpy code? Which definition in which class do I need to redefine?

Thanks in advance

@luksen99
Copy link
Member

luksen99 commented May 2, 2022

Hi,
In the simulation class look at the sourceprofile method, i.e. sourceprofile(self,absorptionprofile,timeprofile,xflat,x0,t,N):
This method is creating a matrix sourceM which acts as laser source term. (More specific, it represents the intensity in 1D space, xflat ant time t).
If you want to add your custom source term, which is not available yet, I would suggest to modify this part of the code and add balistic range electrons.
Output should again be a matrix in the form of sourceM.

@VaSca92
Copy link
Member

VaSca92 commented May 26, 2022

Hi Kristien.

The source is computed and stored in np.array "sourceM", which is a 2D array S[x,t].
Look in the code for "sourceM = self.sourceprofile", sourceprofile contains all the instruction to generate sourceM.

Look then for "def sourceprofile", here is where you want to put the formula. Right now, the code treats separately the space and time dependence, so you want to create an if/elif on the same level of

  • if (absorptionprofile == "LB")
  • if (absorptionprofile == "TMM")
    and add
  • if (absorptionprofile == "Ballistic")

In this new if branch, you want to write the code which compute the expression you posted.

I see there are many parameter in the analytical expression you wrote. If they are not universal constant, I would suggest to add in the source class a method which set as properties all the parameters you need.
Then add to sourceprofile() one extra input, namely the source itself. When sourceprofile() is called in the class "simulation", add as last argument self.source. This will give you the chance to use the source as container/struct and bring all the parameters in the scope of sourceprofile().

One last thing: I am currently working on the new version I will post (probably) by the end of June. Let me know if you already wrote some code for this feature, because I could insert it in the next release of the code.
I do also have a more readable version of the code (if you want to play with it), but it lacks of some features and it is not validated experimentally nor with other software.

If you have any doubt, do not hesitate to tell us. :)
(also I am sorry for the late response)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants