The solver implantation fails in OpenFOAM-v2012
Summary
I copied the code of pimpleFoam solver into a new folder and renamed it as TKEFoam. I change the pimpleFoam.C into TKEFoam.C and I also change the file in the Make folder. When I run TKEFoam, I get this error:
*** Error in `TKEFoam': free(): invalid pointer: 0x0000000000e20048 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x81429)[0x7ff322bac429] TKEFoam(_ZN4Foam5tokenD1Ev+0x75)[0x43a755] ... ...
Steps to reproduce
- create a new folder in OpenFOAM, my folder name is userdefined
- copy the pimpleFoam code from the directory: applications/solvers/incompressible/pimpleFoam to the folder you create
- modify the name of pimpleFoam.C as XXXFoam.C, the operation should be carried out in files in Make folder
- modify the content: "EXE = $(FOAM_APPBIN)/pimpleFoam" as "EXE = $(FOAM_USER_APPBIN)/XXXFoam" in files
- compile the code. Then use channel395 case to test the solver XXXFoam, the errors show up.
What is the expected correct behavior?
Since the solver is the same as pimpleFoam, there should not be any error
Relevant logs and/or images
Environment information
OpenFOAM version : v1912|v2006|v2012 Compiler : intel