@@ -1334,6 +1334,73 @@ Subroutine Custom_MHD_Diagnostics(buffer)
13341334 Endif
13351335 Enddo
13361336
1337+ ! terms bit more broken up
1338+ ! comp, vgrad
1339+ If (compute_quantity(ialtcomp_t3)) Then
1340+ DO_PSI
1341+ qty(PSI) = - buff1(PSI, dvpdp)/ radius(r)/ sintheta(t)
1342+ END_DO
1343+ Call Add_Quantity(qty)
1344+ Endif
1345+ If (compute_quantity(ialtcomp_t4)) Then
1346+ DO_PSI
1347+ qty(PSI) = - buff1(PSI, vtheta)* cottheta(t)/ radius(r)
1348+ END_DO
1349+ Call Add_Quantity(qty)
1350+ Endif
1351+ ! comp, induct
1352+ If (compute_quantity(ialtcomp_t5)) Then
1353+ DO_PSI
1354+ qty(PSI) = - buff2(PSI,btheta)* buff1(PSI, dvpdp)/ radius(r)/ sintheta(t)
1355+ END_DO
1356+ Call Add_Quantity(qty)
1357+ Endif
1358+ If (compute_quantity(ialtcomp_t6)) Then
1359+ DO_PSI
1360+ qty(PSI) = - buff2(PSI,btheta)* buff1(PSI, vtheta)* cottheta(t)/ radius(r)
1361+ END_DO
1362+ Call Add_Quantity(qty)
1363+ Endif
1364+ ! shear, vgrad
1365+ If (compute_quantity(ialtshear_t3)) Then
1366+ DO_PSI
1367+ qty(PSI) = buff1(PSI, dvtdr) - buff1(PSI, vtheta)/ radius(r)
1368+ END_DO
1369+ Call Add_Quantity(qty)
1370+ Endif
1371+
1372+
1373+ ! more TORQUE stuff
1374+ ! torque, vgrad
1375+ If (compute_quantity(alttorque1)) Then
1376+ DO_PSI
1377+ qty(PSI) = radius(r)* sintheta(t)/ four_pi* (buffer(PSI, dbpdr) + &
1378+ &buffer(PSI, bphi)/ radius(r))
1379+ END_DO
1380+ Call Add_Quantity(qty)
1381+ Endif
1382+ If (compute_quantity(alttorque2)) Then
1383+ DO_PSI
1384+ qty(PSI) = buffer(PSI,br)* radius(r)* sintheta(t)/ four_pi* (buffer(PSI, dbpdr) + &
1385+ &buffer(PSI, bphi)/ radius(r))
1386+ END_DO
1387+ Call Add_Quantity(qty)
1388+ Endif
1389+ If (compute_quantity(alttorque3)) Then
1390+ DO_PSI
1391+ qty(PSI) = (sintheta(t)* buffer(PSI, dbpdt) + &
1392+ &costheta(t)* buffer(PSI, bphi))/ four_pi
1393+ END_DO
1394+ Call Add_Quantity(qty)
1395+ Endif
1396+ If (compute_quantity(alttorque4)) Then
1397+ DO_PSI
1398+ qty(PSI) = buffer(PSI,btheta)/ four_pi* (sintheta(t)* buffer(PSI, dbpdt) + &
1399+ &costheta(t)* buffer(PSI, bphi))
1400+ END_DO
1401+ Call Add_Quantity(qty)
1402+ Endif
1403+
13371404 DeAllocate (ind_work_r)
13381405 DeAllocate (ind_work_t)
13391406 DeAllocate (ind_work_p)
0 commit comments