CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Adding new solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2012, 11:46
Default Adding new solver
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Hi,

I made some modifications to src/finiteVolume/fvMatrices/solvers/MULES/ For that I copied MULES to ~/OpenFOAM/shevchuk-2.1.x/src/finiteVolume/fvMatrices/solvers/ and renamed it to MyMULES.

As I don't want to copy the whole finiteVolume library to WM_PROJECT_USER_DIR I just added this line to src/finiteVolume/Make/files:
Quote:
~/OpenFOAM/shevchuk-2.1.x/src/finiteVolume/fvMatrices/solvers/MyMULES/MyMULES.C
after the original line:
Quote:
fvMatrices/solvers/MULES/MULES.C
After the successful compilation are still no MyMULES.C, MyMULES.H & MyMULESTemplates.C in (LIB_SRC)/finiteVolume/lnInclude (MyMULES was definitely compiled)

What didn't I do?
linch is offline   Reply With Quote

Old   May 4, 2012, 12:00
Default
  #2
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
Sometimes lnIncludes don't update. To force it, you can go to src/finiteVolume and execute:
Code:
wmakeLnIncludeAll .
or better yet, just delete src/finiteVolume/lnInclude, and it will automatically rebuild it on compile.

You might also want to do rmdepall so that each object remaps its dependencies.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   May 7, 2012, 07:16
Default
  #3
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Thanks David,

unfortunately it doens't help. I must have forgotten something. Or to be honest, I just don't know how to do it properly.

If I remove dependencies, remove lnInclude and start the compilation over new by executing
Code:
wclean; wmake libso
from src/finiteVolume and look to the output carefully, I see no "MyMULES" at the beginning, where dependencies are established:
Quote:
...
Making dependency list for source file fvMatrices/fvScalarMatrix/fvScalarMatrix.C
Making dependency list for source file fvMatrices/solvers/MULES/MULES.C
Making dependency list for source file fvMatrices/solvers/GAMGSymSolver/GAMGAgglomerations/faceAreaPairGAMGAgglomeration/faceAreaPairGAMGAgglomeration.C
...
But later there are both of them:
Quote:
...
SOURCE=fvMatrices/solvers/MULES/MULES.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/triSurface/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/MULES.o

SOURCE=/home/shevchuk/OpenFOAM/shevchuk-2.1.x/src/finiteVolume/fvMatrices/solvers/MyMULES/MyMULES.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/triSurface/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/MyMULES.o
...
May be it can help diagnosing the problem.
linch is offline   Reply With Quote

Old   May 7, 2012, 07:27
Default
  #4
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Now I have made a dummy modification of MyMULES (just added a space character somewhere, where it doesn't matter) and executed "wmake libso" again. Here is the output:
Quote:
Making dependency list for source file /home/shevchuk/OpenFOAM/shevchuk-2.1.x/src/finiteVolume/fvMatrices/solvers/MyMULES/MyMULES.C
SOURCE=/home/shevchuk/OpenFOAM/shevchuk-2.1.x/src/finiteVolume/fvMatrices/solvers/MyMULES/MyMULES.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/triSurface/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude -I/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/MyMULES.o
'/home/shevchuk/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so' is up to date.
Now, the "Making dependency list ..." line is there. But there is still nothing in lnInclude.
linch is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A New Solver for Supersonic Combustion nakul OpenFOAM Announcements from Other Sources 19 February 27, 2024 09:44
[Other] A New Solver for Supersonic Combustion nakul OpenFOAM Community Contributions 20 February 22, 2019 09:08
thobois class engineTopoChangerMesh error Peter_600 OpenFOAM 4 August 2, 2014 09:52
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08


All times are GMT -4. The time now is 15:41.