UM-PEPL / HallThruster.jl

An open-source fluid Hall thruster code
Other
18 stars 10 forks source link

Want to try with the other propellants than which are given in the document #142

Open krishna123-murali opened 3 days ago

krishna123-murali commented 3 days ago

Hi, I tried simulating in HallThruster.jl with a molecular propellant. But, no ionization rate is seen in my plots (it's basically zero). can you help in resolving this issue? And if possible, could you let me know what all the things I should consider changing the code, if I am trying with new propellant?

archermarx commented 3 days ago

Hi,

Could you post your code, or at least a minimum working example showing the problem?

krishna123-murali commented 3 days ago

Hi,

Could you post your code, or at least a minimum working example showing the problem?

Hi, thanks for the reply. I used the tutorial code to simulate it with Neon as propellant.
Following are the results I obtained. Neon_plot no ionization rate. you can check the configuration I used
Neon_config = HallThruster.Config( ncharge = 1, discharge_voltage = 300u"V", thruster = Neon_thruster, domain = (0.0u"cm", 4.0u"cm"), anode_mass_flow_rate = 1.0u"mg/s", wall_loss_model = HallThruster.WallSheath(HallThruster.BoronNitride), anom_model = HallThruster.MultiLogBohm([0.02, 0.03, 0.04, 0.06, 0.006, 0.2]), propellant = Neon, neutral_velocity = 280.0u"m/s", neutral_temperature = 300.0u"K", ion_temperature = 500.0u"K", cathode_Te = 2.5u"eV", anode_Te = 2.5u"eV", ion_wall_losses = true, ).
Please let me know anything else I can provide from my side thank you

archermarx commented 3 days ago

Hi!

So the issue with Neon is that there are no reaction rate coefficients implemented for it. You can see these files here: https://github.com/UM-PEPL/HallThruster.jl/tree/main/reactions

To use a propellant, you will need to supply your own reaction rate files. Otherwise, no ionization will be able to occur. If you have those files, you should be able to use non-built-in propellants without any modifications to the code.

Molecular propellants are at the moment not well-supported. I will probably be working to add more support for them in the coming months, depending on funding, but at the moment you would only be able to do ionization, not any dissociation or recombination.

krishna123-murali commented 3 days ago

Hi!

So the issue with Neon is that there are no reaction rate coefficients implemented for it. You can see these files here: https://github.com/UM-PEPL/HallThruster.jl/tree/main/reactions

To use a propellant, you will need to supply your own reaction rate files. Otherwise, no ionization will be able to occur. If you have those files, you should be able to use non-built-in propellants without any modifications to the code.

Molecular propellants are at the moment not well-supported. I will probably be working to add more support for them in the coming months, depending on funding, but at the moment you would only be able to do ionization, not any dissociation or recombination.

hi, I actually added the reaction rate files before I started the simulation, still the problem persists

archermarx commented 3 days ago

Can you show me how you added them?

On Mon, Sep 30, 2024, 11:22 AM krishna123-murali @.***> wrote:

Hi!

So the issue with Neon is that there are no reaction rate coefficients implemented for it. You can see these files here: https://github.com/UM-PEPL/HallThruster.jl/tree/main/reactions

To use a propellant, you will need to supply your own reaction rate files. Otherwise, no ionization will be able to occur. If you have those files, you should be able to use non-built-in propellants without any modifications to the code.

Molecular propellants are at the moment not well-supported. I will probably be working to add more support for them in the coming months, depending on funding, but at the moment you would only be able to do ionization, not any dissociation or recombination.

hi, I actually added the reaction rate files before I started the simulation, still the problem persists

— Reply to this email directly, view it on GitHub https://github.com/UM-PEPL/HallThruster.jl/issues/142#issuecomment-2383511157, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOP3QGTF5HX7ELR6BSDYQZ3ZZFUDNAVCNFSM6AAAAABPCQEZTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGUYTCMJVG4 . You are receiving this because you commented.Message ID: @.***>

krishna123-murali commented 3 days ago

sure, For Neon elastic, I named the file as elastic_Ne.dat Energy (eV) Rate coefficient (m3/s) 0.0 0.0 0.000000e+0 1.610000e-21 1.000000e-2 3.140000e-21 3.000000e-2 4.420000e-21 5.000000e-2 5.350000e-21 1.000000e-1 7.070000e-21 3.000000e-1 1.110000e-20 5.000000e-1 1.330000e-20 6.000000e-1 1.420000e-20 7.000000e-1 1.480000e-20 8.000000e-1 1.540000e-20 1.000000e+0 1.620000e-20 1.200000e+0 1.690000e-20 1.500000e+0 1.750000e-20 2.000000e+0 1.830000e-20 3.000000e+0 1.920000e-20 4.000000e+0 1.990000e-20 5.000000e+0 2.070000e-20 6.000000e+0 2.140000e-20 8.000000e+0 2.270000e-20 1.000000e+1 2.420000e-20 1.200000e+1 2.540000e-20 1.500000e+1 2.730000e-20 2.000000e+1 2.930000e-20 2.500000e+1 2.950000e-20 3.000000e+1 2.910000e-20 4.000000e+1 2.740000e-20 5.000000e+1 2.490000e-20 6.000000e+1 2.230000e-20 8.000000e+1 1.800000e-20 1.000000e+2 1.440000e-20 1.200000e+2 1.190000e-20 1.500000e+2 8.780000e-21 2.000000e+2 6.160000e-21 3.000000e+2 3.720000e-21 4.000000e+2 2.590000e-21 5.000000e+2 1.930000e-21 6.000000e+2 1.500000e-21 8.000000e+2 1.010000e-21 1.000000e+3 7.210000e-22
this is how I added for excitation and Ionization too.. I used, using HallThruster: Gas Neon = HallThruster.Gas("Neon", "Ne"; γ = 5/3, M = 20.1797) these to initiate in the code

archermarx commented 3 days ago

Thanks, and where did you put the file?

On Mon, Sep 30, 2024, 11:30 AM krishna123-murali @.***> wrote:

sure, For Neon elastic, I named the file as elastic_Ne.dat Energy (eV) Rate coefficient (m3/s) 0.0 0.0 0.000000e+0 1.610000e-21 1.000000e-2 3.140000e-21 3.000000e-2 4.420000e-21 5.000000e-2 5.350000e-21 1.000000e-1 7.070000e-21 3.000000e-1 1.110000e-20 5.000000e-1 1.330000e-20 6.000000e-1 1.420000e-20 7.000000e-1 1.480000e-20 8.000000e-1 1.540000e-20 1.000000e+0 1.620000e-20 1.200000e+0 1.690000e-20 1.500000e+0 1.750000e-20 2.000000e+0 1.830000e-20 3.000000e+0 1.920000e-20 4.000000e+0 1.990000e-20 5.000000e+0 2.070000e-20 6.000000e+0 2.140000e-20 8.000000e+0 2.270000e-20 1.000000e+1 2.420000e-20 1.200000e+1 2.540000e-20 1.500000e+1 2.730000e-20 2.000000e+1 2.930000e-20 2.500000e+1 2.950000e-20 3.000000e+1 2.910000e-20 4.000000e+1 2.740000e-20 5.000000e+1 2.490000e-20 6.000000e+1 2.230000e-20 8.000000e+1 1.800000e-20 1.000000e+2 1.440000e-20 1.200000e+2 1.190000e-20 1.500000e+2 8.780000e-21 2.000000e+2 6.160000e-21 3.000000e+2 3.720000e-21 4.000000e+2 2.590000e-21 5.000000e+2 1.930000e-21 6.000000e+2 1.500000e-21 8.000000e+2 1.010000e-21 1.000000e+3 7.210000e-22 this is how I added for excitation and Ionization too.. I used, using HallThruster: Gas Neon = HallThruster.Gas("Neon", "Ne"; γ = 5/3, M = 20.1797) these to initiate in the code

— Reply to this email directly, view it on GitHub https://github.com/UM-PEPL/HallThruster.jl/issues/142#issuecomment-2383530591, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOP3QGRDOJPEEP5XMSSRPP3ZZFVCLAVCNFSM6AAAAABPCQEZTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGUZTANJZGE . You are receiving this because you commented.Message ID: @.***>

krishna123-murali commented 3 days ago

In the reactions folder, https://github.com/UM-PEPL/HallThruster.jl/tree/main/reactions

archermarx commented 3 days ago

Interesting. I will take a look at this in more detail in a bit. I'm surprised you didn't hit an error or something.

On Mon, Sep 30, 2024, 11:33 AM krishna123-murali @.***> wrote:

In the reactions folder, https://github.com/UM-PEPL/HallThruster.jl/tree/main/reactions

— Reply to this email directly, view it on GitHub https://github.com/UM-PEPL/HallThruster.jl/issues/142#issuecomment-2383536063, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOP3QGXVJJXQPDWU5SGDQWTZZFVLFAVCNFSM6AAAAABPCQEZTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGUZTMMBWGM . You are receiving this because you commented.Message ID: @.***>

archermarx commented 3 days ago

Could you share just the ionization rates file you used?

krishna123-murali commented 3 days ago

sure, file named as ionization_Ne_Ne+.dat Ionization energy (eV): 21.56 Energy (eV) Rate coefficient (m3/s) 2.156000e+1 0.000000e+0 2.200000e+1 3.255000e-23 2.300000e+1 1.460000e-22 2.500000e+1 3.800000e-22 2.700000e+1 6.316000e-22 2.900000e+1 8.884999e-22 3.100000e+1 1.152000e-21 3.300000e+1 1.416000e-21 3.600000e+1 1.795000e-21 4.000000e+1 2.278000e-21 4.500000e+1 2.824000e-21 5.000000e+1 3.378000e-21 5.500000e+1 3.915000e-21 6.000000e+1 4.355000e-21 6.500000e+1 4.768000e-21 7.000000e+1 5.137000e-21 7.500000e+1 5.472000e-21 8.000000e+1 5.771000e-21 8.500000e+1 6.044000e-21 9.000000e+1 6.281000e-21 9.500000e+1 6.492000e-21 1.000000e+2 6.668000e-21 1.100000e+2 7.002000e-21 1.200000e+2 7.249000e-21 1.300000e+2 7.425000e-21 1.400000e+2 7.565000e-21 1.500000e+2 7.724000e-21 1.750000e+2 7.812000e-21 2.000000e+2 7.812000e-21 4.000000e+2 6.316999e-21 6.000000e+2 5.249999e-21 8.000000e+2 4.468000e-21 1.000000e+3 3.970000e-21

archermarx commented 3 days ago

Thanks, and as a test, can you try just copying the default xenon file and naming it as if it's neon? This will help me determine if it's a file loading issue or a physics issue.

krishna123-murali commented 3 days ago

I tried doing it, this is the result I got... Xe_copied_as_Ne I just changed the file as neon

archermarx commented 3 days ago

Ok, so this tells me the issue is more physics -based. It's possible that the high ionization energy means the thruster isn't really able to start up when using the default electron temperature at start. I'll give some thought to how to mitigate this

On Mon, Sep 30, 2024, 11:46 AM krishna123-murali @.***> wrote:

I tried doing it, this is the result I got... Xe_copied_as_Ne.jpg (view on web) https://github.com/user-attachments/assets/c99b09bd-6c0b-4473-844a-98222cd5b799 I just changed the file as neon

— Reply to this email directly, view it on GitHub https://github.com/UM-PEPL/HallThruster.jl/issues/142#issuecomment-2383565563, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOP3QGWU3MYCNFBL5FLPGE3ZZFW4TAVCNFSM6AAAAABPCQEZTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBTGU3DKNJWGM . You are receiving this because you commented.Message ID: @.***>

krishna123-murali commented 3 days ago

sure, thank you very much. Meantime let me try changing the electron temperature. If I find something I will get back to you.

archermarx commented 3 days ago

To alter how the simulation initializes, you can write a new initialize! function (see https://github.com/UM-PEPL/HallThruster.jl/blob/main/src/simulation/initialization.jl) for a new initialization type. I'm now also adding parameters to the DefaultInitialization struct to allow for electron temperatures to be manually specified.

krishna123-murali commented 3 days ago

Can you brief me on this. Due you want me to change the anode_Te and cathode T_e (or) do you want me to write new initialization function in the code?? Thank you

archermarx commented 3 days ago

Actually, if you wait a few minutes, I am making a change to the code to make some things easier.

krishna123-murali commented 3 days ago

sure thank you

archermarx commented 3 days ago

OK, I've just updated the code to v0.17.0. Now, you can do the following in your config:

config = Config(
    ...,
    initial_condition = DefaultInitialization(max_electron_temperature = 50),
    reaction_rate_directories = ["dir1", "dir2"]
)

The first change lets you specify a maximum initial electron temperature, while the second change makes it easier to tell the code where to find reactions. These directories will be searched in order before the code looks in the default directory.

krishna123-murali commented 2 days ago

but I am getting an error as defaultInitialization is not defined

archermarx commented 2 days ago

You'll need to do HallThruater.DefaultInitialization

krishna123-murali commented 2 days ago

got unsupported keyword argument "reaction_rate_directories". This is the error I am getting

archermarx commented 2 days ago

strange, can you double check that you're on v0.17.0? The following works for me:

cfg = HallThruster.Config(
       thruster = HallThruster.SPT_100,
       discharge_voltage = 200,
       domain = (0, 0.05),
       reaction_rate_directories = ["dir1", "dir2"],
       anode_mass_flow_rate = 5e-6,
       )
krishna123-murali commented 9 hours ago

Hello, I checked with the version, I am on V0.17.0.
Julia>HallThruster.DefaultInitialization HallThruster.DefaultInitialization

julia>Neon_config = HallThruster.Config( ncharge = 1, discharge_voltage = 300u"V", thruster = Neon_thruster, domain = (0.0u"cm", 8.0u"cm"), anode_mass_flow_rate = 8.0u"mg/s", wall_loss_model = HallThruster.WallSheath(HallThruster.BNSiO2), anom_model = HallThruster.MultiLogBohm([0.02, 0.03, 0.04, 0.06, 0.006, 0.2]), propellant = Neon, neutral_velocity = 500.0u"m/s", neutral_temperature = 500.0u"K", ion_temperature = 500.0u"K", cathode_Te = 2.5u"eV", anode_Te = 2.5u"eV", ion_wall_losses = true,
initial_condition = DefaultInitialization(max_electron_temperature = 50),
reaction_rate_directories = ["dir1", "dir2"] ) ERROR: UndefVarError: DefaultInitialization not defined Stacktrace: [1] top-level scope @ REPL[13]:1 I tried doing this but the error persists. could you help me with this???

archermarx commented 8 hours ago

Try HallThruster.DefaultInitialization. I don't export that name.

On Thu, Oct 3, 2024, 7:59 AM krishna123-murali @.***> wrote:

Hello, I checked with the version, I am on V0.17.0. Julia>HallThruster.DefaultInitialization HallThruster.DefaultInitialization

julia>Neon_config = HallThruster.Config( ncharge = 1, discharge_voltage = 300u"V", thruster = Neon_thruster, domain = (0.0u"cm", 8.0u"cm"), anode_mass_flow_rate = 8.0u"mg/s", wall_loss_model = HallThruster.WallSheath(HallThruster.BNSiO2), anom_model = HallThruster.MultiLogBohm([0.02, 0.03, 0.04, 0.06, 0.006, 0.2]), propellant = Neon, neutral_velocity = 500.0u"m/s", neutral_temperature = 500.0u"K", ion_temperature = 500.0u"K", cathode_Te = 2.5u"eV", anode_Te = 2.5u"eV", ion_wall_losses = true, initial_condition = DefaultInitialization(max_electron_temperature = 50), reaction_rate_directories = ["dir1", "dir2"] ) ERROR: UndefVarError: DefaultInitialization not defined Stacktrace: [1] top-level scope @ REPL[13]:1 I tried doing this but the error persists. could you help me with this???

— Reply to this email directly, view it on GitHub https://github.com/UM-PEPL/HallThruster.jl/issues/142#issuecomment-2391237479, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOP3QGWVV4VMLZ3324P7ORLZZUWS3AVCNFSM6AAAAABPCQEZTKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJRGIZTONBXHE . You are receiving this because you commented.Message ID: @.***>

krishna123-murali commented 8 hours ago

Thank you. It's working. I will update you if I get the ionization rate