|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Greetings!
I am really new to OpenFOAM. I am trying to add energy equation to mhdFoam. I found this (energy equation for icofoam) and I am trying to adapt that to mhdFoam. I created files and created a folder named "mymhdFoam" but "wmake" doesnt work at all. So I can't even run a case to diagnose my errors. Error is related to being root user but sudo not working. I made an google search tried everything. Still nothing. Error is: " mkdir: cannot create directory '/opt/openfoam6/platforms/linux64ccDPInt320pt/aplications' : Permission denied /opt/openfoam6/wmake/wmake: line 410: make: command not found /opt/openfoam6/wmake/wmake: line 413: make: command not found wmake error: file '/opt/openfoam6/platforms/linux64ccDPInt320pt/aplications/solvers/electromagnetics/mymhdFoam/sourceFiles' could not be created in /opt/openfoam6/applications/solvers/electromagnetics/mymhdFoam " Any help would be great. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 206
Rep Power: 16 ![]() |
looks like you are writing to the install directory of openfoam, not to your local directory. what does your "files" file say inside your Make folder?
it should look something like mymhdFoam.C EXE = $(FOAM_USER_APPBIN)/mymhdFoam (notice here that i changed FOAM_APPBIN to FOAM_USER_APPBIN as well). You should not need to use sudo privileges to compile your solver. Another reason could be that OpenFOAM (for some reason, probably related to write permission issues) can not create the folder to place your solver into. I had this issue once (I think) and a "hack" was to simply create the folder myself, i.e. inside your local openfoam folder you would need to create the folders "platforms/linux64ccDPInt320pt/aplications" ... by the way, are you sure that it is aplications and not applications? maybe there is a type somewhere in your script and this could cause the issue? |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Quote:
Dr. Teschner, Thank you for your quick reply. Yes it is "applications" I am using ubuntu in a different computer so I typed all the statements above, so it is a typo. I changed "mhdFoam" statements inside the Make/files with "mymhdFoam" no mistake there. I just added the USER statement inside the "EXE = $(FOAM_USER_APPBIN)/mymhdFoam" as you recommended But error still consists. wmake error: file "Make/linux64ccDPInt320Opt/sourceFiles coul not be created in /correspondingpath(this is not what terminal says)" I think its about: /opt/openfoam6/wmake/wmake: line 410 make: command not found /opt/openfoam6/wmake/wmake: line 413 make: command not found I checked that lines but I don't know what to do there. Last edited by ErenC; April 22, 2019 at 15:54. |
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 206
Rep Power: 16 ![]() |
hmm, but you are invoking wmake in the terminal inside the folder where your source code is located? did you load the openfoam environment variables before? i.e. did you type something like this before into your terminal: source /opt/openfoam6/etc/bashrc ?
|
|
![]() |
![]() |
![]() |
![]() |
#5 | |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Quote:
Oh, I am sorry I should have mentioned all the steps. Yes, I am opening "mymhdFoam" folder in GUI, and by right clicking inside the folder I am opening terminal, after that I am executing bashrc file like you said "source /opt/openfoam6/etc/bashrc" I am also executing "mkdir -p $FOAM_RUN" but "mkdir -p $FOAM_RUN" but I think mkdir step doesn't have a significance at this step because error message doesn't change in either way. I copied all openfoam files from /opt/openfoam6 to my home folder. I tried in there, this time inside mymhdFoam/Make there is a linux64GccDPInt32Opt folder but no file inside and error message consist of permission denied. |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Apparently I had to install "make"
This thread has the answer but It's not over yet! I just created the source files, all is good. But, mymhdFoam foam still not working... I have to mention that files inside the /Make/linux64GccDPInt32Opt are protected and owned by root. All the other files are owned by me. Something is fishy and I really, really understand why ubuntu computers doesn't usually get virus. Even I can't make a change in system files... |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 206
Rep Power: 16 ![]() |
ah, we were having much more fundamental problems :3 ... ok, in this case, i would recommend to install the essentials with sudo apt-get install build-essential (which would have also installed make), in this way you will have most / all of the required development tools you need and avoid similar problems in the future.
well, it doesn't change your problem now, what does your terminal output when you type "echo $FOAM_USER_APPBIN" or "echo $FOAM_RUN"? the mkdir -p $FOAM_RUN will just create a folder in which you can place all your simulations. The -p just says that the folder will be created if not already present, so it will not have any influence here |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Ah, thank you! As I said I am fairly new to OpenFOAM environment.
echo $FOAM_USER_APPBIN gives: /home/erenc/openFOAM/erenc-6/platforms/linux64GccDPInt32Opt/bin echo $FOAM_RUN gives: /home/erenc/OpenFOAM/erenc-6/run |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 206
Rep Power: 16 ![]() |
ok, so it is in your local directory (/home/erenc/...), so i am a bit confused why you would get write permission issues. so now when you type wmake in your solver directory, it still gives you the error of write permission? that's strange, because the environmental variable $FOAM_USER_APPBIN is pointing to the right location (to your home folder /home/erenc/openFOAM/erenc-6/platforms/linux64GccDPInt32Opt/bin) while the error message says that it tries to write to a system path (/opt/openfoam6/platforms/linux64ccDPInt320pt/applications, which should be the same path as your $FOAM_APPBIN path (I would assume), you could double check by typing echo $FOAM_APPBIN) ... actually, the last folder should be bin, not applications, are you sure that you set used FOAM_USER_APPBIN and not FOAM_USER_APP ? there is a difference (but I doubt that it makes a difference).
Just to check, can you post the content of the files and options files inside your Make directory? |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Member
Eren
Join Date: Aug 2018
Posts: 86
Rep Power: 9 ![]() |
Sooo, my main files was inside the:
/opt/openfoam6 and my local files was inside the: /home/OpenFoam/erenc-v1806 etc. After reading your commend I created that dir "home/erenc/OpenFOAM/erenc-6 moved files there, wmake now works! Altough I can just start to diagnose my errors but still a progress! ![]() I kinda feel like I wasted your time till now with this newbie problems, sorry about that! and thanks a lot! If I can't make any progress I will try to bother you again! ![]() |
|
![]() |
![]() |
![]() |
![]() |
#11 |
Senior Member
Tom-Robin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 206
Rep Power: 16 ![]() |
no worries, glad i could help
![]() |
|
![]() |
![]() |
![]() |
![]() |
#12 |
Member
Join Date: Jan 2017
Posts: 71
Rep Power: 9 ![]() |
Erenc: Done with adding temperature equation ? I want to discuss
|
|
![]() |
![]() |
![]() |
Tags |
energy equation, mhdfoam, openfoam, wmake error |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 07:56 |
Can't get chtMultiRegionSimpleFoam to working. | shiromaniac | OpenFOAM Running, Solving & CFD | 11 | October 18, 2021 08:40 |
chtMultiRegion not solving for velocity field | obiscolly50 | OpenFOAM Running, Solving & CFD | 22 | November 9, 2018 13:40 |
How to see the temperature values in Celsius along with the temperature field | rogbrito | COMSOL | 0 | July 14, 2018 16:09 |
Strange temperature field in Laval nozzle | EvgenyMogilevskiy | OpenFOAM Running, Solving & CFD | 0 | August 14, 2014 09:59 |