<div dir="ltr"><div>Hi all! <br>I'm carrying out some single fluid resistive MHD runs with constant resistivity using the <i>/MagneticResistivity/MagneticResistivityMain/Constant</i> unit. <br>Now I would like to implement a spatially dependent resistivity, but I'm not sure which is the easiest way without modifying different subroutines in different units.  <br><br>The optimal implementation would be to create a new unit that keeps the structure of the <i>/MagneticResistivity/MagneticResistivityMain/Constant</i> unit, <br>so I didn't have to change anything else in other units. But the problem with this idea is that the <i>MagneticResistivity subroutine</i>, <br>which calculates the resistivity, has no notion of spatial coordinates. And to provide this subroutine with the spatial coordinates doesn't seem obvious. <br><br>Another possibility might be to save the resistivity in a scratchcenter variable, but in this case I couldn't take advantage of the structure of the <i>/MagneticResistivity/MagneticResistivityMain/Constant</i> unit. <br><br>Any ideas or suggestions will be appreciated!<br></div><div><br></div><div>Thanks in advance! </div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" style="font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="monospace" color="#666666"><font style="background-color:rgb(234,209,220)"><font><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline"><div style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline"><i style="background-color:rgb(255,255,255);line-height:normal">PhD Ernesto Zurbriggen,<br></i></div><div style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline"><i style="background-color:rgb(255,255,255);line-height:normal">Assistant researcher (CONICET)</i><i><br></i></div></span></font></font><font style="background-color:rgb(234,209,220)"><span style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline"><div style="font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;margin:0px;padding:0px;border:0px;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;background-color:rgb(255,255,255)"><i></i></span></div></span></font></font></div><div dir="ltr" style="font-style:inherit;font-variant:inherit;font-weight:inherit;margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;vertical-align:baseline"><i style="line-height:normal"><font face="monospace" color="#666666"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><i style="background-color:rgb(234,209,220)"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><div style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;vertical-align:baseline;background-color:rgb(255,255,255)">Email:</span><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;vertical-align:baseline;background-color:rgb(255,255,255)"><i style="line-height:normal"> <a href="mailto:ernesto.zurbriggen@craam.mackenzie.br" target="_blank">ezurbriggen@</a><a href="http://unc.edu.ar/" target="_blank">unc.edu.ar</a></i></span><i><br></i></div><div style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><i><span style="font-size:12.8px">IP phone: (+54) 351-535 3776</span> (int. 75601)<br></i></div></span></i></span><br></font></i></span></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;vertical-align:baseline"><i style="line-height:normal"><font face="monospace" color="#666666">Instituto de Astronomía Teórica y Experimental (IATE-CONICET), </font></i></span></div><div style="margin:0px;padding:0px;border:0px;font-stretch:inherit;line-height:inherit;vertical-align:baseline"><font face="monospace" color="#666666"><span style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:normal;vertical-align:baseline"><i style="line-height:normal"><i style="font-weight:inherit;line-height:normal">Francisco Laprida sth 922</i></i></span><i style="font-weight:inherit;line-height:normal">, X5000BGR, </i><i style="font-weight:inherit;line-height:normal">Córdoba, </i><i style="font-weight:inherit;line-height:normal">Argentina. </i></font></div></div></div></div></div>