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

how to access windows files from openfoam v2012

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 8, 2021, 18:03
Default how to access windows files from openfoam v2012
  #1
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 264
Rep Power: 6
boffin5 is on a distinguished road
Hello,
Although I'm a newbie with OF8, I'm even more of one for v2012.
I have some text files that I want to use to create a case in the windows version. But I can't figure out how to access them from OF v2012. I think it involves something like a mnt/c command, but I can't make it work. Sorry for such a basic question, but after researching, I'm still stumped. Hope someone can save me from the spectre of vi-ing them in.
boffin5 is online now   Reply With Quote

Old   August 9, 2021, 04:53
Default
  #2
New Member
 
Niklas Boehnke
Join Date: Jul 2021
Location: Lübeck
Posts: 12
Rep Power: 4
janibo is on a distinguished road
Hi Alan,

are you using a virtual box or the ubuntu subsystem?
janibo is offline   Reply With Quote

Old   August 9, 2021, 07:03
Default
  #3
Member
 
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 7
petros is on a distinguished road
Hi,

If you are using WSL, you can navigate to the ubuntu files with:

Code:
cd /mnt/c/Users/<USERNAME>/AppData/Local/Packages/CanonicalGroupLimited.<UBUNTUVERSION>/LocalState/rootfs/home
petros is offline   Reply With Quote

Old   August 9, 2021, 11:34
Default
  #4
Senior Member
 
Alan w
Join Date: Feb 2021
Posts: 264
Rep Power: 6
boffin5 is on a distinguished road
Thanks petros and janibo,
The system that I'm having trouble with is OpenFOAM Min GW cross-compilation; this is the WSL version, I believe. While in this OpenFOAM, I need to be able to read native windows10 files, but haven't found the method.
Also I run OpenFoam8 via Ubuntu on virtual box; for this one I have a bridge to the windows files, so it's no problem. I think it's similar to what petros has suggested.
But the problem remains: how to bridge between native windows10, and WSL OpenFoam?
boffin5 is online now   Reply With Quote

Old   August 10, 2021, 03:48
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,085
Rep Power: 26
Yann will become famous soon enough
Hi Alan,

What Petros is talking about is referenced as "Windows 10 native (WSL)"

What you are using is "Windows - minGW" installation which is, I guess, different.

I cannot really help with that since I never used it. On windows I usually go for WSL which is quite easy to use and works for both ESI-OpenCFD and Foundation versions. I find it easier than setting up a virtualbox.

By the way, if you are already using OpenFOAM-8 on a virtualbox, why not installing OpenFOAM-v2021 on the same virtualbox? It would save you the effort of setting up 2 different installations for OpenFOAM-8 and v2012 and you could seamlessly switch from one version to another. (same goes for WSL where you can use both versions)

----
Just in case some people might be interested, here are clarifications about filesystems under WSL:

In WSL, your windows filesystem is accessible from /mnt/c. From there you can navigate in your windows files. So you can setup your cases from the windows explorer pretty much wherever you want. For instance, something like /mnt/c/USER/OpenFOAM-run.

You can also access your linux filesystem through the windows explorer following the path given by Petros: /mnt/c/Users/<USERNAME>/AppData/Local/Packages/CanonicalGroupLimited.<UBUNTUVERSION>/LocalState/rootfs

This makes things pretty easy to share files from both windows and openFoam-linux environments.
----

I hope this helps,
Yann
petros likes this.
Yann is offline   Reply With Quote

Old   August 11, 2021, 06:08
Default
  #6
New Member
 
Niklas Boehnke
Join Date: Jul 2021
Location: Lübeck
Posts: 12
Rep Power: 4
janibo is on a distinguished road
You could either try the:

explorer.exe . command for direct access.

or you could try a shared (linked) folder with:

ln command.

https://superuser.com/questions/1083...side-of-ubuntu
janibo is offline   Reply With Quote

Old   August 12, 2021, 02:38
Default
  #7
New Member
 
Join Date: Jun 2016
Posts: 4
Rep Power: 9
engio is on a distinguished road
If you're using Windows 10 MinGW cross-compiled OpenFOAM2012, you can access your windows file system like this..(c, d is drive letter in windows)

ls -l /c/Windows
cp /c/Windows/write.exe /d/testDirectory
engio 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
[mesh manipulation] Multi-region mesh from .stl files in OpenFoam V7 carl_r OpenFOAM Meshing & Mesh Conversion 7 January 4, 2024 09:02
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 08:51
[Gmsh] gmshToFoam on openfoam windows version of OpenFOAM v1812? SihunLee OpenFOAM Meshing & Mesh Conversion 0 June 17, 2019 05:44
CFX11 + Fortran compiler ? Mohan CFX 20 March 30, 2011 18:56
Results saving in CFD hawk Main CFD Forum 16 July 21, 2005 20:51


All times are GMT -4. The time now is 11:29.