Syntax of code in usr_rates.f

Hello!

I am going through usr_rates.f files from different tutorials so that I can implement my own usr_rates.f files, and in order to understand what is happening better, I was wondering if there is documentation of the syntax used in these files that I could look at? I’ve tried looking through the user guide but haven’t had much luck.

For example, just with if statements: sometimes the action is on the same line as the condition, sometimes it’s an “if… then” statement, some have an “&” with the action on the next line (I’m unsure if it’s a logical “and” or if it means a continuation on the next line), some have an “endif,” etc. This was just one example about differences with if statements specifically, but I have some others, like about variable declarations, etc. If there was documentation of the general syntax, that would be so so helpful to clarify my understanding of the subtleties of code and how to precisely produce my own. I would appreciate it so much!

Thanks a lot,
Amanda

@amanda.baumann - it’s just standard FORTRAN. The things like one-line IF vs multi-line IF-THEN-ENDIF are explained in any FORTRAN reference. & is just a line-continuation character, in FORTRAN the Boolean operators are spelled .AND. and .OR.

One of the development plans for MFiX going forward is to make it easier to specify reaction rates without knowing FORTRAN. However that’s going to be a while – so you’re going to have to deal with usr_rates.f for the time being.

– Charles

1 Like

Oh I see. I will look up FORTRAN references. Thank you!