programming scalarTransport Function Object in OF V12

Submitted by Islem on Sat, 08/30/2025 - 01:33

Hi all,

I want to build my own function object called my-scalarTransport for the purpose of building the adjoint scalar transport equation. I am using OF 12. I am a beginner at programming. So as a start I just complied the existing scalarTransport function object using a new name my-scalarTransport.
I compiled the new function in the same library libsolverFunctionObjects with no error. Then I tested my new function in the pitzDailyScalarTransport case but I got this error

Create time

--> FOAM FATAL IO ERROR:
Cannot find configuration file my-scalarTransport

I know that I have to add my new function object to runTimeSelectionTable, but I don't know how to do it. Any help with this matter would be very much appreciated.

The scalarTransport.C source file contains the scalarTransport word in many locations, I tried to replace it with the new name but this didn't help. I attached here scalarTransport.C and scalarTransport.H FYI.

AttachmentSize
Binary Data source files of the scalarTransport5.58 KB