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

A quick question about the directory complaint

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 10 Post By floquation

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2017, 12:32
Default A quick question about the directory complaint
  #1
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Dear Foamers,

I have a quick question about the directory complaint.
Currently, I am trying to compile my own solver based on 'interMixingFoam'. Some problems are raised in directory problem.During the compilation of my solver, the system complaints like ‘could not open file correctPhi.H for source file MLB.C due to No such file or directory‘. Hence, I reach the ../Make/options files, the shortcut path is written like:’$(LIB_SRC)’. However, my question is when I command ‘echo $LIB_SRC’ in the terminal, it seems like there is no such a path being able to be recognized.
I am not sure the reason for that. Can you please give me some comment about this error?

The directory seems like an easy-solving bug but cannot recognise it. Have read about all the former post about the directory problem but seems not work for my case. Really appreciate any help!

Thanks,
Linyan
linyanx is offline   Reply With Quote

Old   February 6, 2017, 12:35
Default
  #2
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
The directory in ../Make/options is wroten like this.
Attached Images
File Type: jpg Capture1.jpg (66.7 KB, 150 views)
linyanx is offline   Reply With Quote

Old   February 7, 2017, 04:03
Default
  #3
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 20
floquation will become famous soon enough
Quote:
Originally Posted by linyanx View Post
Hence, I reach the ../Make/options files, the shortcut path is written like:’$(LIB_SRC)’. However, my question is when I command ‘echo $LIB_SRC’ in the terminal, it seems like there is no such a path being able to be recognized.
I am not sure the reason for that. Can you please give me some comment about this error?
Echo does not work, because it is not an environmental variable. Rather, it is a local variable to the wmake script.
When you call wmake, you execute a script, which eventually looks at your Make/files and Make/options file. Before doing so, it sources this file:
Code:
(...)/OpenFOAM-4.0/wmake/makefiles/general
which does:
Code:
LIB_SRC         = $(WM_PROJECT_DIR)/src
and there you have your (non-environmental) variable!


------


The file "correctPhi.H" is not part of OpenFoam's source tree. Rather, it is part of the interFoam solver.

So my guess is, when you based your solver on interMixingFoam, you only copied interMixingFoam, whereas you should have copied the parent directory (interFoam) as well.
That's why in Make/options you see "-I.. ".
floquation is offline   Reply With Quote

Old   February 7, 2017, 15:05
Default
  #4
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Thanks! Kevin. You've made my day. Like what you comment, the reason for system's 'Could not find such a file or directory'complaint is partly copying the interMixingFoam solver instead of the whole interFoam package. As it complaints, the CorrectPhi.H is one of the header files for interFoam instead of the OpenFoam's source tree. Hence, the header file should be copied along with the to-be-modified solver.

Again, thanks for Kevin's help.

Regards,
Linyan
linyanx 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
Quick Question on Calculation Time Davitt COMSOL 0 January 14, 2016 14:16
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43
OpenFoam install script Error during paraFoam installation SePe OpenFOAM Installation 10 June 19, 2010 15:15
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 03:01
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 09:50


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