Archive for Computational Physics

Last Chance Lab

Posted in Biographical, Education, Maynooth with tags , , on May 7, 2026 by telescoper

Today is the penultimate day of teaching in the Spring Semester at Maynooth University and I’m here in the Computer Lab for the last time. This afternoon’s session is just a drop-in consultation session for Computational Physics students doing their projects and although it has been busier than previous weeks it has not exactly been a hive of activity. The deadline for project submissions is tomorrow afternoon, so I was expecting a bit of a rush at this session, which is the last of its type, and also at my office hour this morning. I did have one student attend this morning, and a couple of others this afternoon, but other than for them it has been quiet.

On the other hand, over a day before the deadline, three students have already submitted their project reports and code. I’m impressed with that, but also a little surprised. I’ve come to expect just-in-time delivery for such things.

Yesterday I did my last particle physics tutorial of the year and followed that immediately afterwards I attended a long session of final-year project talks, from 3pm to just after 6pm. It is obvious that some students find these presentations a bit of an ordeal but it is important to learn how to present your work so such things are part of the rite of passage. It is good for staff to get an overview of the all projects being done in the Department too.

In previous years the final project presentations for students in the Departments of Theoretical Physics and Experimental Physics were done separately, the former having a somewhat smaller audience than the latter. The two previous Departments having merged into a single Department of Physics, this time round we had all the talks together (though spread over two days, yesterday and the Wednesday before). I think the combined sessions worked quite well and we will probably do it this way next year.

After the session of talks there was a small drinks party in the foyer of the Science Building. That was a nice occasion, and it struck me that it would have been the last time this group of students would all meet together until their graduation. Tomorrow I do my last particle physics lecture and it will be the last time I see quite a few of the students in that class until graduation too. They’ve been a nice group to work with, very engaged and easy to interact with. It is a great pleasure to be teaching students who are eager to learn . That’s the aspect of academic life I’ll miss the most when I retire.

The Sharp End of Term

Posted in Biographical, Education, Maynooth with tags , , , on April 23, 2026 by telescoper

So here I am, sitting in the (empty) Physics Computer Lab. The formal Computational Physics lab sessions are over, but I’m on duty to provide help the students with their project work, which will take up the remaining two-and-a-bit weeks of term. It’s a lovely day outside which explains why there are very few people in the lab, and none of them have asked for help so I’ve been busy getting on with some work. Past experience with these sessions suggests that they’ll all come just before the project deadline, which is May 8th.

Up until last week I had a Computational Physics lecture at 9am on Thursdays, but the last one of those happened last Thursday. It was nice to have a more leisurely start this morning. I did think I might get a haircut on the way to work but when I passed my usual barber’s I saw it was full of people waiting their turn so I walked on. It seems that the good weather gave quite a few people the same urge to have shorter hair.

Yesterday was the last Class Test for my other class, Particle Physics, and I’ve taken the opportunity to correct all the scripts for that. I even had time to type up the solutions all neatly and tidily in Latex (including doing Feynman diagrams, which is fun).The end of that job means no more grading for that module until the main examination, which is about a month away. I do however, have lectures and tutorials still to do, including two at 9am on Tuesdays.

The finest weather is usually reserved for the exam period, of course, to maximize the annoyance of students. In my memory all my undergraduate examinations took place in very fine weather, with the exception of my Physics practical the night before which there was an enormous thunderstorm. Come to think of it, that could well have been a portent that warned me off experiments and made me become a theorist.

Back for the Last Four Weeks…

Posted in Biographical, Education, Maynooth with tags , , , on April 13, 2026 by telescoper

So the Easter break is over and I was back to campus today armed with a very long to-do list. I’m pleased to say I’ve ticked all the items off except the last, which was to prepare my lecture for 9am tomorrow. I’ll do that after supper.

I was very tired this morning after doing a bit of gallivanting for a couple of days. Am I too old to be carrying on like that? Yes. Do I intend to stop? No. Although I had a lot to do I didn’t have any lectures or tutorials so I was able to knuckle down and get on with things, interrupted only by an obligatory telecon.

We have four weeks left until the end of lectures for Semester 2. To be precise it’s four weeks minus one Bank Holiday (on Monday 4th May) which makes it 3.8 (working) weeks, but I don’t have lectures on Mondays so this isn’t very relevant to me. My Particle Physics module will continue in the same vein until the end of teaching but Computational Physics changes after this week, with lectures and formal lab sessions ending allowing the students time to do their mini-projects (which they have already started). They will still have access to the labs and be able to consult the demonstrators for help on their projects, though they can work at home (or somewhere else) instead if they prefer.

Other signs of the approaching end of term is that the May Examination timetable has been published, the required papers are being printed, schedules of student presentations are being circulated, and arrangements being made to mark projects.

When teaching is over for the academic year , and before exam marking starts, assuming a whole day of decent weather arrives, I plan to walk from Maynooth into Dublin along the Royal Canal. That’s a distance of 27 km. I do intend to walk the length of the National Famine Way later this year, but I was convinced to do one stage first to see if my knees can take it. The final leg of the Famine Way is from Maynooth to Dublin, which is convenient because if I’m forced to give up I can easily get the bus or train home, as I can if I reach the end.

Now for a quick supper, write my lecture for tomorrow morning, and have an early night!

Ahead of a Four-Day Week…

Posted in Artificial Intelligence, Biographical, Education, mathematics, Maynooth with tags , , , , , , on March 29, 2026 by telescoper

It’s Sunday 29th March – Palm Sunday in fact – and Friday 3rd April is Good Friday, which is followed by a break of a week for Easter, so I’ve been looking at what I have to do in the four days between Monday and Thursday.

On Tuesday afternoon part of my 3rd Year Computational Physics class will be doing a supervised test in the computer lab. I (foolishly) promised to ensure they would get their grades before Easter, so I’m going to have to mark them straight away. This is a larger group than usual because some students who would normally be in the lab on Thursdays swtiched to Tuesday so they could go on a trip to Armagh. Anyway, this is the third lab test and at least I have graded the first two tests for all groups in time for the arrival of the new ones.

There will be one more of these lab tests after the Easter break but after that the students will be working full-time for 3 weeks or so on mini-projects. That is the part they usually enjoy most and I’m very happy to see that some have already started work.

Then, on Wednesday I have the second class test for my 4th year Particle Physics module. This is the second such test, and it will be held during a tutorial session. This is a pen-and-paper test rather than a coding test to be done in the lab. For such tests I allow students to bring whatever they like on paper but phones, laptops and tablets are banned. This is the easiest way I could think of to avoid students using AI to solve the problems. In previous years I gave take-home assignments for this module, and I still hand out exercise sheets to be gone over in tutorials, but these are for formative purposes only. The summative assessments are the class tests. There will be three of those, which means they will have to endure one more after Easter. In a normal week I would have a Particle lecture on Friday, but that won’t happen because it’s Good Friday and my lectures apparently aren’t good enough to happen on that day.

As well as the Computational Physics lab test and the Particle Physics class test, next I have two lectures, both at 9am – one on Tuesday and one on Thursday – and another lab session on Thursday which is not a test, but a practical session about solving ODEs.

Then it will be the Easter Break. After that, according to my calculations, there will be four more teaching weeks before the examination period. The last day of teaching is May 8th. Between that and the examinations there is a gap of a week during which I will have to mark all the completed Computational Physics project reports, as well as giving some revision classes if there is demand for them.

The Next Semester

Posted in Artificial Intelligence, Education, mathematics, Maynooth with tags , , , , , , , on January 26, 2026 by telescoper

There’s just a week to go before the next Semester at Maynooth University so I’ve been looking at my calendar for the weeks ahead. Actually, I won’t start teaching again until Tuesday 3rd February, because Monday 2nd February is a national holiday. As it turns out, however, I don’t have any lectures, labs or tutorials on Mondays anyway so I won’t be missing a session either on February 2nd or on May 4th, another holiday. I will have to miss one on Friday 3rd April (Good Friday), though.

The Timetable has given me two 9 o’clock lectures a week for the forthcoming Semester, one on Tuesdays and the other on Thursdays. I don’t think the students like 9am lectures very much, but I don’t mind them at all. I find it quite agreeable to have accomplished something concrete by 10am, which I don’t always do. This schedule might mean that I defer publishing papers at the Open Journal of Astrophysics on those days. I usually do this before breakfast, but I might not have time if I have to be on campus and ready to teach for 9am.

As usual, Semester 2 is a stop-start affair. We have six weeks until the Study Break, which includes the St Patrick’s Day holiday, then we’re back for two weeks (minus Good Friday) before another week off for Easter. We return on Monday April 13th to complete the Semester; the last lectures are on Friday 8th May and exams start a week later. This arrangement creates no problems for lecture-based teaching, but it takes some planning to organize labs and project deadlines around the breaks. I’ll have to think about that for my Computational Physics module.

A more serious issue for Computational Physics is how to deal with the use of Generative AI. I’ve written about this before, in general terms, but now it’s time to write down some specific rules for a specific module. A default position favoured by some in the Department is that students should not use GenAI at all. I think that would be silly. Graduates will definitely be using CoPilot or equivalent if they write code in the world outside university so we should teach them how to use it properly and effectively.

In particular, such methods usually produce a plausible answer, but how can a student be sure it is correct? It seems to me that we should place an emphasis on what steps a student has taken to check an answer, which of course they should do whether they used GenAI or did it themselves. If it’s a piece of code to do a numerical integration of a differential equation, for example, the student should test it using known analytic solutions to check it gets them right. If it’s the answer to a mathematical problem, one can check whether it does indeed solve the original equation (with the appropriate boundary conditions).

If anyone out there reading this blog has any advice to share, or even a link to their own Department’s policy on the use of GenAI in computational physics for me to copy adapt for use in Maynooth, I’d be very grateful!

(My backup plan is to ask ChatGPT to generate an appropriate policy…)

Marking Over

Posted in Biographical, Education, Maynooth with tags , on June 9, 2025 by telescoper

Better is the end of a thing than the beginning thereof…

I’ve just graded the last of my assignments for this (academic year). I had a bigger class than usual for Computational Physics this time round, so it took much longer than usual to mark the project component. It always takes a while because I not only have to read and grade the reports, but also look at the code they submit and run it to check that it works. I uploaded the final grades to our system just now and although I finished later than planned I was relieved to see that I’m not the last lecturer to do so!

What happens next is that all the marks from all the modules will be collated and cross-checked. Then we will have a meeting of the Departmental Examination Board (on Thursday morning) to go through the results in the presence of our External Examiner. Since this is the end of the academic year, we will also look at the final grades of those students who are completing their studies this year in order to consider the classification of their degrees. There may also be some who are not qualified to graduate and may have to repeat failed examinations or other assessments. Another (pleasant) duty of our Examination Board on Thursday will be to award prizes for the best performance, not just for finalists but for students at every stage, including the first year.

I was teaching a module for the Department of Engineering last Semester so I should attend their final Examination Board too. Many of our students at Maynooth take joint degrees, in which case their final degree classification depends on grades from two Departments. For that reason, there is an overall Examination Board at which the marks are combined. Fortunately, only the Head of Department (who is not me) has to attend that one.

If all goes to plan, students will receive their final marks on Friday 27th June. It’s a lengthy process so as to allow plenty of opportunities to check and validate the different stages. After that, on Tuesday 1st July, we have a consultation day at which students can ask for advice about repeat examinations, etc, and after that we have to make sure repeat examinations are available. The repeat examination period is Wednesday 6th August to Tuesday 19th August.

Between the end of this week and the repeat exams, perhaps I’ll get a bit of time to do some research…

New Publication at the Open Journal of Astrophysics

Posted in OJAp Papers, The Universe and Stuff with tags , , , on January 11, 2024 by telescoper

Well, it’s 2024 and time to start a new volume – the seventh – of the Open Journal of Astrophysics with the very first paper of the new year. The paper in question is the 1st paper in Volume 7 (2024)  and the 116th altogether. This one was published on 8th January 2024.

The title is “A new timestep criterion for N-body simulations” and it presents a new method for estimating characteristic dynamical timescales in N-body simulations, based on derivatives up to fourth order, which can be used to adjust timesteps used in numerical computations. The paper is in the folder marked Earth and Planetary Astrophysics as the paper discusses applications to orbital dynamics in planetary systems, but the method is of much wider applicability.

The authors are Dang Pham & Hanno Rein  (University of Toronto, Canada) and David S. Spiegel (Google, USA).

Here is the overlay of the paper containing the abstract:

 

 

You can click on the image of the overlay to make it larger should you wish to do so. You can find the officially accepted version of the paper on the arXiv here.

A Midweek Lecture

Posted in Biographical, Education with tags , , , , on May 3, 2023 by telescoper

It’s halfway through the last week of teaching term, and it’s been a busy day. Earlier on, I gave my final “proper” lecture of the Semester in Advanced Electromagnetism, about the reflection and transmission of electromagnetic waves at interfaces. That’s basically optics, but done in terms of the electric and magnetic fields. I have two more classes this week, on Friday, but these will be revision tutorials devoted to going through past examination questions etc. I’ve had special requests for problems involving conformal transformations and the method of images, so that should be fun!

Meanwhile, my Computational Physics class are working hard on their projects, due in on Friday. My office is opposite the lab so I’ve had a few students coming to ask for help, but mostly they are just beavering away. I hope most of them are writing up by now. I just did a quick check and nobody has submitted anything yet. I suppose that, as usual, they will all wait until the last minute!

I have a telecon coming up in a few minutes, but after that I’ll be attending this public lecture:

The speaker, Professor Clare Elwell is a physicist at University College London, where she is the Director of the Near Infrared Spectroscopy (NIRS) Group. Specifically, Prof Elwell develops non-invasive techniques to study brain function, paving the way for defining early markers of autism, developing more targeted care following brain injury, and for better understanding brain development in global health settings. Prof Elwell described her pioneering work in using invisible near infrared light to probe the human brain. Near Infrared Spectroscopy (NIRS) is a portable, wearable, low-cost brain imaging technology which can be used to study the brain in newborn babies, toddlers and adults in a range of different scenarios.

I’ll post an update when I get home after the lecture. Actually, there’s no need because the lecture was streamed and a recording is now available. The lecture starts a fairly long way in and the sound didn’t start until part-way through the introductions so I’ve cued the link to the start of the lecture itself.

It was a very interesting lecture by a very engaging speaker. The audience was smaller than I’d expected, though, with less than a hundred in the theatre. This might be because it was scheduled in the middle of the last week of teaching term, which is a very busy time of year for academic staff.

Teaching those who want to learn

Posted in Biographical, Education, mathematics, Maynooth with tags , , , on April 21, 2023 by telescoper

Yesterday afternoon I ran the last formal Computational Physics laboratory of the term. As is often the case with these sessions, the students were given a Python task to work through, with assistance available from myself and a demonstrator (and indeed other students). We have 25 students registered on this module, who are split into two groups, so about a dozen students were in yesterday’s session. That’s a comfortable number to make sure everyone can get some help.

This is the sixth year I’ve done this module, and I decided a long time ago that the best way to ensure that students learn the necessary skills is to give them things to do and let them work things out for themselves (with help where necessary). A couple of years ago, on my module feedback questionnaire, a student wrote an intended criticism along the lines of – “It’s like he expects us to learn to code by doing it ourselves, rather than him teaching us”. That is, of course, exactly what I intended, though we do give plenty of help during the labs.

Just as the best way to learn a foreign language is by speaking it, the best way to learn coding is by writing programs. Some of the students on this module have done any before, so for them the early stages of the module are rather straightforward. At least half the class, however, haven’t done any programming, so for them it’s a fairly steep learning curve.

Anyway, it being the last formal session of term this week’s task was a rather challenging one, involving the solution of a boundary value problem via the shooting method. It’s a good exercise because it brings together methods for solving ordinary differential equations with root-finding, as well as requiring some thought as to the general construction of a code that combines these two.

As expected, given the difference in background of the students, some finished this in good time, but others went more slowly. Some very excellent things happened, though, which made me very happy with the the whole experience.

One was that instead of leaving as soon as they had finished, a few of the students who had completed the task early stayed behind to help their friends. I encourage this, but it doesn’t always happen as much as yesterday. It’s called teamwork, and it’s essential not only in physics but also in everyday life.

The lab session was supposed to finish at 4pm, but not all students were done by then. Another excellent thing though was they didn’t just quit when they had run out of time. I stayed well past 4pm to help those who were determined to finish. In one case it was just a ‘0’ that should have been a ‘1’ in the index of an array that stopped it working. I don’t know why it took me so long to spot this, but we got there in the end.

One student, however, had another class at 4pm so left, only to return at five to continue. The student finally left, having completed the exercise, at about 6.45. The persistence shown by the students in refusing to be defeated was truly admirable. This harks back to a piece of advice I gave some time ago:

If you really want to develop as a physicist, don’t just solve a lot of easy problems; challenge yourself by tackling difficult ones too. Don’t be afraid to get “stuck” or make a mistake, as those are both necessary parts of the learning process. Above all, develop the confidence in your ability to take on a problem and back yourself to solve it and don’t be deterred if the answer doesn’t come quickly!

You may say that if it took some students much longer than the allocated time to finish then the problem was too difficult. That may be the case, but do you ever really learn if you’re not stretched? There is a place for straightforward formulaic tasks in higher education, but there’s much more to a university education than doing things like that.

Obviously the lab took up much more of my time as I had originally planned – more than double, in fact – but I went home pleased with a good day’s work. As I’ve said on this blog many times before, there are few things more rewarding than teaching students who want to learn.

Essays and (Computational) Physics

Posted in Biographical, Education, Maynooth with tags , , , , , on March 14, 2023 by telescoper

There have been more news stories about ChatGPT and assessment in universities going around. There’s one here from The Journal and another here from The Conversation to give just two examples.

I wrote about this myself a couple of months ago in a post that included this:

I have to admit that I’ve never really understood the obsession in some parts of academia with “the student Essay” as a form of assessment. I agree that writing skills are extremely important but they’re not the only skills it is important for students to acquire during the course of a degree. Of course I’m biased because I work in Theoretical Physics, an area in which student essays play a negligible role in assessment. Our students do have to write project reports, etc, but writing about something you yourself have done seems to me to be different from writing about what other people have done. While forms of assessment in science subjects have evolved considerably over the last 50 years, other domains still seem to concentrate almost exclusively on “The Essay”.

Whatever you think about the intrinsic value of The Essay (or lack thereof) it is clear that if it is not done in isolation (and under supervision) it is extremely vulnerable to cheating.

A few people have retorted that communication skills are very important in higher education. I agree with that wholeheartedly, but it seems to me that (a) there are other ways of communicating than via formal essays and (b) there are, should be, more to academic study than  writing about things.

That said, I do think we could be doing more in some disciplines, including my own, to cultivate communication skills in general and writing skills in particular. In Theoretical Physics we certainly don’t do this as much as we should. I do have a project report in my 3rd Year computational physics module, but that is a relatively short document and the report itself counts only one-third of the marks (and the project is only 40% of the module mark).

These thoughts somehow reminded me of this. You can click on it to make it bigger if it’s difficult to read. It was the first paper (called colloquially Paper Zero) of my finals examination at the University of Cambridge way back in 1985, getting on for 40 years ago:

wpid-wp-1425648226410.jpeg

As you can probably infer from the little circle around number 4, I decided to write an Essay about topic 4. I’ve always been interested in detective stories so this was an easy choice for me, but I have absolutely no idea what I wrote about for three hours. Nor do I recall actually ever getting a mark for the essay, so I never really knew whether it really counted for anything. I do remember, however, that I had another 3-hour examination in the afternoon of the same day, two three-hour examinations the following day, and would have had two the day after that had I not elected to do a theory project which let me off one paper at the end and for which I got a good mark.

Anyway, to get back to the essay paper, we certainly don’t set essay examinations like that here in the the Department of Theoretical Physics at Maynooth University and I suspect they no longer do so in the Department of Physics at Cambridge either. At the time I didn’t really see the point of making students write such things under examination conditions but then we didn’t have ChatGPT way back then. No doubt it could generate a reasonable essay on any of the topics given.

I am skeptical about whether any of my 3rd year computational physicists would use ChatGPT to write their reports, but they might. But ChatGPT can write Python code too. Am I worried about that? Not greatly. I’ve asked it to write scripts for the various class exercises I’ve set so far and the code it has produced has usually failed. It will get better though….