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

How to modify or change file in Windows environment

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2016, 16:43
Default How to modify or change file in Windows environment
  #1
New Member
 
Manjurul Alam
Join Date: Oct 2016
Posts: 1
Rep Power: 0
malam14 is on a distinguished road
I have installed newly released OpenFOAM in my windows laptop. Everything is fine, I can run tutorials from the terminal windows using OpenFOAM start. But the problem is I could not change the blockMesh Dict or any other file in windows environment. Say for example, I need to change the geometry of the cavity case folder and to do that I have to go to the blockMesh dict file of the cavity folder and need the change the dimensions there. But i cannot open those files in windows? Is there any other way that I can change or modify those files upon my requirement in windows environment?

Thank You.
malam14 is offline   Reply With Quote

Old   October 9, 2016, 04:35
Default
  #2
New Member
 
Pablo Mtz. Filgueira
Join Date: Apr 2014
Location: Vitoria-Gasteiz
Posts: 25
Rep Power: 12
pablo_fil is on a distinguished road
Quote:
Originally Posted by malam14 View Post
I have installed newly released OpenFOAM in my windows laptop. Everything is fine, I can run tutorials from the terminal windows using OpenFOAM start. But the problem is I could not change the blockMesh Dict or any other file in windows environment. Say for example, I need to change the geometry of the cavity case folder and to do that I have to go to the blockMesh dict file of the cavity folder and need the change the dimensions there. But i cannot open those files in windows? Is there any other way that I can change or modify those files upon my requirement in windows environment?

Thank You.
If you have them located, you can open them with any text editor. I suggest you gedit for windows or Notepad++.
pablo_fil is offline   Reply With Quote

Old   October 19, 2016, 04:15
Default
  #3
New Member
 
Joakim
Join Date: Jul 2015
Posts: 14
Rep Power: 10
joxen is on a distinguished road
Quote:
Originally Posted by pablo_fil View Post
If you have them located, you can open them with any text editor. I suggest you gedit for windows or Notepad++.
Hi, I have the same problem.
I understand that it's possible to edit all files with a text-editor but how to I locate the files in the windows environment? How do I open the files to edit them? Do I need to transfer them from the virtual environment to windows environment?

I use windows 7, and the installation is OK and I can run the tutorials from the OpenFOAM_start window.
joxen is offline   Reply With Quote

Old   October 19, 2016, 04:19
Default
  #4
New Member
 
Joakim
Join Date: Jul 2015
Posts: 14
Rep Power: 10
joxen is on a distinguished road
Quote:
Originally Posted by malam14 View Post
I have installed newly released OpenFOAM in my windows laptop. Everything is fine, I can run tutorials from the terminal windows using OpenFOAM start. But the problem is I could not change the blockMesh Dict or any other file in windows environment. Say for example, I need to change the geometry of the cavity case folder and to do that I have to go to the blockMesh dict file of the cavity folder and need the change the dimensions there. But i cannot open those files in windows? Is there any other way that I can change or modify those files upon my requirement in windows environment?

Thank You.

I have exactly the same question, did you get any solution?
joxen is offline   Reply With Quote

Old   October 19, 2016, 04:33
Default
  #5
New Member
 
Pablo Mtz. Filgueira
Join Date: Apr 2014
Location: Vitoria-Gasteiz
Posts: 25
Rep Power: 12
pablo_fil is on a distinguished road
Quote:
Originally Posted by joxen View Post
Hi, I have the same problem.
I understand that it's possible to edit all files with a text-editor but how to I locate the files in the windows environment? How do I open the files to edit them? Do I need to transfer them from the virtual environment to windows environment?

I use windows 7, and the installation is OK and I can run the tutorials from the OpenFOAM_start window.
I don't know which Windows OF package are you using. Try to find where is installed.

I use CFDSupport's OF and everything is on a folder inside C:\. Once located, search blockMesh and it will give you the complete path.

If you don't know where is installed, "repeat" installation steps to find out where is the default path located.

Hope it helps
pablo_fil is offline   Reply With Quote

Old   October 19, 2016, 05:15
Default
  #6
New Member
 
Joakim
Join Date: Jul 2015
Posts: 14
Rep Power: 10
joxen is on a distinguished road
Quote:
Originally Posted by pablo_fil View Post
I don't know which Windows OF package are you using. Try to find where is installed.

I use CFDSupport's OF and everything is on a folder inside C:\. Once located, search blockMesh and it will give you the complete path.

If you don't know where is installed, "repeat" installation steps to find out where is the default path located.

Hope it helps

Okey I use OpenFOAM.v1606 and the path where the program is installed is: C:\Program\ESI\OpenFOAM\1606, but there are only 3 subfolders in that folder, Documents, ThirdParty, Windows, and 3 files opencfd.ico, readme and uninstall. ('ve also tried to search at blockMesh in the entire C disk without any result (can't find the file)

To explain further in the Documents are only guides an manuals, in Thirdparty the Docker.exe is located and in Windows folder some scripts.
There seems to be no program files there at all there.

However I find the files when launching OpenFoam terminal and the path to the files are there: /opt/OpenFOAM/OpanFOAM-v1606+/
Do you know how to find this path in in windows?

I worked with Linux before but never with virtual machines.
joxen is offline   Reply With Quote

Old   November 6, 2018, 06:25
Default Which text editor
  #7
New Member
 
Jayabrata Dhar
Join Date: Nov 2018
Posts: 17
Rep Power: 7
jd87 is on a distinguished road
QUOTE: Hi, I have the same problem.
I understand that it's possible to edit all files with a text-editor but how to I locate the files in the windows environment? How do I open the files to edit them? Do I need to transfer them from the virtual environment to windows environment?

I use windows 7, and the installation is OK and I can run the tutorials from the OpenFOAM_start window. QUOTE

I have understood the environmental structure and all the echo are working fine. But which text editor I can use to edit the files in OF Windows. nano or edit does not seem to work in the VM environment under windows.
jd87 is offline   Reply With Quote

Old   November 6, 2018, 18:11
Default
  #8
New Member
 
John Bayldon
Join Date: Nov 2018
Posts: 5
Rep Power: 7
JohnMB is on a distinguished road
If you are using WSL the simplest solution is to create folder in the windows filesystem

e.g.

md mnt/c/Users/myUserName/Documents/openFoam


you can then save or copy files to that directory and edit them from either side.


I believe if you try to edit linux file system files from windows bad things can happen.

you can then run any openFoam scripts or commands from within the mounted directory.
cd mnt/c/Users/myUserName/Documents/openFoam
JohnMB is offline   Reply With Quote

Old   November 7, 2018, 04:13
Default
  #9
New Member
 
Jayabrata Dhar
Join Date: Nov 2018
Posts: 17
Rep Power: 7
jd87 is on a distinguished road
Quote:
Originally Posted by JohnMB View Post
If you are using WSL the simplest solution is to create folder in the windows filesystem

e.g.

md mnt/c/Users/myUserName/Documents/openFoam


you can then save or copy files to that directory and edit them from either side.


I believe if you try to edit linux file system files from windows bad things can happen.

you can then run any openFoam scripts or commands from within the mounted directory.
cd mnt/c/Users/myUserName/Documents/openFoam
Yes I was actually doing that roundabout way, saving a copy, editing with notepad++ and then copying it back to my shared folder. However, that is a bit inconvenient. I can use vi which is installed but its usage is pretty old and cumbersome if you have to edit a huge amount of text. Better, if there was an option like nano or gedit which seems not installed in that VM Oracle-OpenFOAM system. Is there a way to get those?
jd87 is offline   Reply With Quote

Old   November 7, 2018, 05:27
Default
  #10
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
The WSL installation of OpenFoam and Windows share all files located on the c:// drive of your windows system. You can edit these files either from Linux or Windows. You can also run OpenFoam simulations in this folder.

I myself use an OpenFoam folder located at c://OpenFoam/run/ . From my linux console i can reach the folder via cd /mnt/c/OpenFoam/run/ .
Files located within can be edited using an Windows text editor (e.g. npp) or from the linux side using gedit, nano, vim. Given, form gedit you'll need to install xming on your Windows system.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   November 7, 2018, 06:46
Default Solved
  #11
New Member
 
Jayabrata Dhar
Join Date: Nov 2018
Posts: 17
Rep Power: 7
jd87 is on a distinguished road
Thanks....I can install nano and gedit using
yum install nano
yum install gedit.
Now it is working fine.
I did not know it was RHEL based prompt (and not Debian based).
jd87 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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 11:32
[swak4Foam] Swak4FOAM 0.2.3 / OF2.2.x installation error FerdiFuchs OpenFOAM Community Contributions 27 April 16, 2014 15:14
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 05:18
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 09:13.