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

New Feature : Two-Way Coupling #12

Open
joeschoonover opened this issue Oct 23, 2017 · 12 comments
Open

New Feature : Two-Way Coupling #12

joeschoonover opened this issue Oct 23, 2017 · 12 comments
Assignees

Comments

@joeschoonover
Copy link

Two-way coupling between WAM and IPE is the goal for FY 2018. There are three main tasks, from which subtasks can be broken out :

  • Add local arrays to WAM for accepting IPE arrays.
  • Add routines with IPE to calculate terms needed by WAM.
  • Update Mediator
@joeschoonover
Copy link
Author

Issue NOAA-SWPC/WAM-IPE#54 is a subtask for this issue

@timfullerrowell
Copy link

timfullerrowell commented Aug 22, 2018

Notes for 2-way coupling below.
Includes questions on rotation of vectors (?).
Tim needs to check equations and signs work both ends of the flux tube.

This is what we currently do:

Neutral winds from WAM in geographic eastward, northward and vertical directions U(1), U(2), U(3) are passed from WAM to IPE (ms-1)

The mediator interpolates the neutral wind values to the IPE grid, keeping the directions still geographic

In IPE on the IPE grid, we rotate these vectors to the magnetic east, magnetic equatorward/down, and parallel to magnetic field, to generate neutral winds on the IPE grid in the magnetic directions: Un(1), Un(2), Un(3) (m s-1)
Do we have the code in IPE that does this?

We need to calculate the ion drag momentum tendencies and Joule heating in IPE to pass back to WAM. To do this we need to:

a) Calculate the ion velocities in the IPE grid in the magnetic east and equatorward/ down directions (see below) Vi(1), Vi(2) (m s-1)

b) Use the ion velocity parallel to B from FLIP, which is the weighted average of the O+ and H+ field aligned velocities (parallel to B), weighted by the mass mixing ratio of the ions – Vi(3) (m s-1)

Required to pass to Subroutine Calculate_Tendencies_for_WAM:

Global real parameters on IPE grid from IPE lower boundary to ~1000 km

Ion-neutral collision frequency: vin (s-1)
Total plasma density: ne (m-3)
Mean ion mass: mi (amu)
Parallel ion velocity (see above): Vi(3) (m s-1)
Neutral wind in magnetic directions (see above) Un(1), Un(2), Un(3) (m s-1)
Neutral mass density rho (k gm-3))
Height of the grid points above Earth’s surface (to only calculate tendencies to ~1000 km) (m)

Point of discussion:
Do we use the electric field and total magnetic field from foot point value or allow for height dependence?

Electric field in magnetic east E(1) and south/down E(2) (V m-1)
Total magnetic field B (Tesla)

Calculate ions velocities perpendicular ion velocities Vi(1) and Vi(2):

Constants
Elementary charge:

q (C)

Ion gyro frequency:

wi = q * B / mi

Ratio of ion-neutral collision frequency and ion gyro frequency :

k = vin / wi

Vi(1) = E(2) / (B * (1. + k2))
+ k * Un(2) / (1. + k
2)
+ k * E(1) / (B * (1. + k2))
+ k
2 * Un(1) / (1. + k**2)

Vi(2) = - E(1) / (B * (1. + k2))
- k * Un(1) / (1. + k
2)
+ k * E(2) / (B * (1. + k2))
+ k
2 * Un(2) / (1. + k**2)

We will then need to rotate the ion velocities Vi(1), Vi(2), and Vi(3) from magnetic to geographic directions east and north to V(1) and V(2) ( I think this is one of the AVAILABLE apex transformations?)

Eastward momentum tendency EMT (m s-2):

EMT = mi * ne * vin * (U(1) – V(1)) / rho

Northward momentum tendency NMT (m s-2):

NMT = mi * ne * vin * (U(2) – V(2)) / rho

Joule heating JHT (J kg-1 s-1)

JHT = ne * vin * ((U(1) – V(1))**2 + (U(2) – V(2))**2) / rho

Subroutine returns these three tendencies.

@timfullerrowell
Copy link

Naomi, (Tzu-Wei, Joe)

As we just discussed, to be more specific, sometime next week, could I please get feedback on these questions regarding the 2-way coupling:

  1. Should we include height dependence of E and B along flux tube in the 100 to ~1000 km height range.

  2. What are the positive directions of the following parameters at each end of the flux tubes in the north and south hemisphere:
    a) Neutral wind parallel to B, and perpendicular to B in the magnetic equatorward/northward/ up/down direction
    b) Direction of B
    c) Direction of E perpendicular in the magnetic equatorward/northward/up/down direction
    d) Direction of parallel and perpendicular ion velocities

@twfang
Copy link
Contributor

twfang commented Sep 4, 2018

@IonospherePlasmasphereElectrodynamics
Naomi, could you please take a look at Tim's questions and see if we can get everything sort out int the coming few days? We were not included in the issue tracer earlier and have missed the messages that Tim sent late week.

@twfang
Copy link
Contributor

twfang commented Sep 6, 2018

@timfullerrowell to answer your questions, for the Apex coordinate, positive B is Northward. Eastward electric field and eastward ion velocity are positive. Downward/equatorward electric field and ion velocity are positive. However, all these need to be verified in the IPE refactor code.

@naomimaruyama
Copy link

naomimaruyama commented Sep 7, 2018 via email

@twfang
Copy link
Contributor

twfang commented Sep 17, 2018

For completed list of fields that need to be extracted from IPE for WAM, please refer to the closed issue NOAA-SWPC/WAM-IPE#118.

@twfang twfang transferred this issue from another repository Dec 3, 2019
@twfang
Copy link
Contributor

twfang commented Aug 6, 2020

Need to provide these parameters into WAM, see #5 in GSMWAM-IPE

@twfang
Copy link
Contributor

twfang commented Sep 16, 2020

Ion-neutral collision frequency vin (s-1): ion_neutral_collisionfrequency in IPE_Plasma_Class.F90
Total plasma density: ne (m-3): plasma % electron_density
Mean ion mass: mi (amu): ion_mass_amu in IPE_Plasma_Class.F90
Parallel ion velocity (see above) Vi(3) (m s-1): plasma % ion_velocities(1,i,lp,mp)
Neutral wind in magnetic directions (see above) Un(1), Un(2), Un(3) (m s-1): Ue(1) and Ue(2) are calculated in subroutine Calculate_Field_Line_Integrals
Neutral mass density rho (k gm-3)): the same as the calculation in SWIO
Height of the grid points above Earth’s surface (to only calculate tendencies to ~1000 km) (m)

Constants, Elementary charge:

q (C) Ion gyro frequency wi = q * B / mi : similar to the calculation in omega_op in IPE_Plasma_Class.F90

Ratio of ion-neutral collision frequency and ion gyro frequency: k = vin / wi

Vi(1) and Vi(2) are in magnetic coordinates:

Vi(1) = E(2) / (B * (1. + k^2)) + k * Un(2) / (1. + k^2) + k * E(1) / (B * (1. + k^2)) + k^2 * Un(1) / (1. + k^2)

Vi(2) = - E(1) / (B * (1. + k^2)) – k * Un(1) / (1. +k^2) + k * E(2) / (B * (1. + k^2)) + k^2 * Un(2) / (1. + k^2)

Electric field in magnetic east E(1) and south/down E(2) (V m-1): eldyn % electric_field(2,lp,mp)
Total magnetic field B (Tesla): grid % magnetic_field_strength(i,lp,mp)

We will then need to rotate the ion velocities Vi(1), Vi(2), and Vi(3) from magnetic to geographic directions east and north to V(1) and V(2) ( I think this is one of the AVAILABLE apex transformations?)

Eastward momentum tendency EMT (m s-2):

EMT = mi * ne * vin * (U(1) – V(1)) / rho

Northward momentum tendency NMT (m s-2):

NMT = mi * ne * vin * (U(2) – V(2)) / rho

Joule heating JHT (J kg-1 s-1)

JHT = ne * vin * ((U(1) – V(1))**2 + (U(2) – V(2))**2) / rho

Subroutine returns these three tendencies.

@twfang
Copy link
Contributor

twfang commented Sep 16, 2020

@rmontuoro and @timfullerrowell Could you please take a look at my comment and see if they make sense to you? I have all IPE parameters written in bold. Thank you!

@timfullerrowell
Copy link

timfullerrowell commented Sep 16, 2020 via email

@twfang
Copy link
Contributor

twfang commented Sep 16, 2020

I think so, but I will take a look at these winds again. I have added the tendencies back to the comment.

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

7 participants