Updated Outflow Module
The outflow module has been updated with a few new features, so that I can use it for my 3D, pulsed, magnetized, cooling jets. I basically added 3 new profile objects to the outflow object:
- SpeedProfile: Before, you could only give the outflow object one outflow speed, and you could make it oscillate sinusoidally if needed. Now, the outflow object will first check to see if there is a SpeedProfile. This is a profile of the outflow speed as a function of time. I put this in here so that I can eventually set up a profile of random velocities to use.
- TempProfile: The original outflow object just takes one temperature for the entire outflow. Now, with the TempProfile, you can give it a profile of temperature with respect to radius. This was necessary to use the hydromagnetic pressure equilibrium profile that I have used in my jets.
- MagProfile: The original outflow object took one value for the peak toroidal magnetic field. Now, you can pass it a MagProfile which a profile of toroidal magnetic field strengths as a function of radius. The functionality for other field geometries is not there yet, but I, and many other projects, would only need toroidal fields anyways. We can implement helical fields later.
I built a new PulsedJet problem module which uses this new outflow object set up. In my module, I define an appropriate temperature and magnetic field profile. I have not done the random velocity profile yet, but that should be pretty straight forward. I plan on putting all of these profiles into profile_functions.f90 so that anyone can easily use them.
Below is a very low resolution example of a 3D, magnetized, pulsed, cooling jet. It is a 2D slice of density.
The bow shock seems pretty wide to me, and I have not yet figured out why. I have checked my temperature profile several times, and it is correct. Perhaps there is some confusion between thermal pressure and internal energy within the outflow object. I'm going to investigate this further just to make sure everything is working accurately. The magnetic field part looks like it's working perfectly, and I haven't seen any restarts yet.
This simulation is pretty slow since I'm just using 16 procs on alfalfa. I'll let it run further in order to see if there are any more bugs that need to be worked out.
UPDATE
I fixed a bunch of stuff related to the new outflow module:
- Got the velocity pulses working.
- Edited the new pulsed jet problem module to handle hydro (non-MHD).
- Edited profiles.f90 to make it more user-friendly.
- Fixed some issues with the magnetic field part of the outflow object. This involved a time dependent issue, and also replacing use of MagProfile with !EMFProfile.
Number 4 above has been the trickiest to solve, and I'm not convinced that we have it right yet. One issue is that you cannot step on magnetic fields because that could create divergence. So what the code does is add a certain amount of field to the outflow object. However, you can't just keep adding your initial magnetic field profile because then the field will build up and you'll have too much magnetic energy/pressure.
The amount of field you need to add is equal to the amount of field that has advected out of the outflow object. Everything in the outflow object is done in terms of the EMF, so the EMF source that needs to be in the outflow object is as follows:
This should, in theory, take care of time-dependent issues. One other issue that remains unresolved is that the initial Bphi profile in the chombo does not match the Bphi profile that I supply.
Many of these points look ok, but I'm not sure why the profile has a discrepancy around r = 0.5. This might be solved by increasing resolution or subcycling.
Below are low resolution simulations with the current implementation. Much better than before, and maybe good enough, but I want to figure out the Bphi issue first.
Attachments (8)
- pulsedjet_new_rho.png (25.5 KB) - added by 10 years ago.
- pulsedjet_new_rho.gif (258.7 KB) - added by 10 years ago.
- Bphiprofile.png (21.1 KB) - added by 10 years ago.
- newpulsedjet_hydro.png (19.3 KB) - added by 10 years ago.
- newpulsedjet_hydro.gif (678.4 KB) - added by 10 years ago.
- newpulsedjet_beta1.png (20.3 KB) - added by 10 years ago.
- newpulsedjet_beta1.gif (761.2 KB) - added by 10 years ago.
- emfsource.png (25.2 MB) - added by 10 years ago.
Comments
No comments.