Hello,
If Bfield is a known spatial profile, you should be able to easily construct an OVF file for it in other software (like python). The format for an OVF file is fairly straightforward- it is basically a header, then the field strength at each point. If the index are i, j, k, it starts increasing i and then j. (I recommend running a test file, and saving some toy model field, and you will be able to reverse the format quickly). You'll want to be careful to try to match the meshsize/system size and everything.
Once you have the OVF files, you can load them using B_ext.Add(LoadFile("antenna.ovf"),f(t) )
The f(t) is a bit trickier. If it is a simple analytic function, you can just plug it in, and it will be evaluated at each time step, as the above sin example. No extra work needed.
If you want it imported from a file, that can be done, although I think perhaps a bit trickier. I can think of a few ways to do so.
The first thing that comes to mind is to load the points of f(t) into an array, and then use a for-loop to step through each time step. It is pretty straightforward to do something like load a textfile in golang, even if it's not built into mumax directly. I don't think mumax's Loadfile method works directly with scalars- it is a Slice object. Although you could probably do some workaround things by making it a fake ovf format, but having the scalar embedded in the OVF.
You can also construct the mx3 file itself programmatically using say, python. The jupyter notebook from the mumax
workshop gives some examples of how to do this. Using python you can easily pipe in variables without the hassle of golang.
They are a bit messy, perhaps someone knows a better way. Out of the above, the python is probably easiest/most straightforward. Or generate it inside the mumax file directly. It depends on the form of f(t).
Best,
Josh L.