|
[Sponsors] |
[OpenFOAM.com] How to compile ccmToFoam on precompiled v2406 for Ubuntu (in WSL) ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 27, 2024, 08:11 |
How to compile ccmToFoam on precompiled v2406 for Ubuntu (in WSL)
|
#1 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,243
Rep Power: 29 |
Hello all,
I'm running OpenFOAM-v2406 on WSL/Ubuntu. I installed the precompiled openfoam2406-default package. I need to use ccmToFoam, which requires to be compiled after building the libccmio library, but I fail to do so. EDIT: I solved my issue, so I'm going to turn this post into a tutorial. Here is the process:
Here you go, you should now be able to use ccmToFoam and foamToCcm If anyone more competent than me knows a better way to do this, let me know! Yann Last edited by Yann; June 27, 2024 at 11:03. |
|
December 5, 2024, 14:23 |
|
#2 |
New Member
Hernan
Join Date: Jul 2015
Posts: 5
Rep Power: 11 |
Hello Yann,
Great tutorial, it works for me! I haven´t use this application (ccmToFoam), I have use the ccm26ToFoam application from the Foundation version sometimes Do you use ccmToFoam regularly? What kind of meshes had you use? This case attached was composed for two regions so I use the "-merge" option and works fine. OpenFOAM-Mesh.jpg StarCCM-Mesh.jpg Best regards Hernán Ramírez |
|
December 6, 2024, 04:47 |
|
#3 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,243
Rep Power: 29 |
Hello Hernán,
Thank you, I'm glad this has been useful for you! I needed ccmToFoam for a specific case so I did not have many opportunities to use it, but I've been able to convert hex and poly meshes. It also worked to convert a multi region mesh for a CHT case, with some extra step required after conversion to deal with region interfaces. I don't know the exact differences, but according to these release notes, ccm26ToFoam has been deprecated and replaced by ccmToFoam since OpenFOAM-v1612+ in the OpenCFD branch. Cheers, Yann |
|
December 6, 2024, 12:55 |
|
#4 |
New Member
Hernan
Join Date: Jul 2015
Posts: 5
Rep Power: 11 |
Hello Yann,
Thank you for your answer. In the company I work, we use Star-CCM+ (I've been using it for the last 7 years), but I want to implement OpenFOAM as an option to solve some cases. My next step (in a few weeks) is to convert a mesh of a CHT case. Could you explain what extra steps are requiered after conversion? Cheers, Hernán |
|
December 9, 2024, 06:09 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,243
Rep Power: 29 |
Hello Hernán,
For CHT cases in OpenFOAM, we usually use splitMeshRegions to split the mesh and create the coupled interfaces between regions. You can use ccmToFoam to convert a CHT mesh using the -solids option, but you end up with disconnected regions. I used stitchMesh to reconnect the regions together, and then used splitMeshRegions to split the mesh and create the interfaces. It's probably possible to use splitMeshRegions first and then deal with the interfaces using something like createPatch, but I'm lazy and I'd rather let splitMeshRegions do the job for me I couldn't find a way to avoid disconnected regions after running ccmToFoam (-merge does not seem to change anything in this case). Let me know if you find another way to achieve it without having to stitch the mesh! Cheers, Yann |
|
January 8, 2025, 05:43 |
|
#6 | |
New Member
Juan
Join Date: Jun 2024
Posts: 3
Rep Power: 2 |
Quote:
Hi Yann, I am experiencing some issues in the 10th step. When I was trying to run the makeCCMIO script I have found the following error: openfoam@Ubuntu:/usr/lib/openfoam/openfoam2406/ThirdParty$ ./makeCCMIO Appear to have {wmkdepend,wmkdep} binary Found sources: sources/libccmio-2.6.1 Starting build: libccmio-2.6.1 (lib) cpMakeFiles libccmio . Compiling enabled on 12 cores wmake lib wmake: 'Make' directory does not exist in /usr/lib/openfoam/openfoam2406/ThirdParty/sources/libccmio-2.6.1 Searching up directories tree for Make directory Error: no Make directory for /usr/lib/openfoam/openfoam2406/ThirdParty/sources/libccmio-2.6.1 Error building: libccmio-2.6.1 To give some context, I am running the steps in Ubuntu 22.04 version inside an Oracle Virtual Box Machine. Moreover, I run some of the previous steps with the command "sudo" because without it the installations and decompressions failed saying "permission denied". Thank you in advance! |
||
January 8, 2025, 06:57 |
|
#7 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,243
Rep Power: 29 |
Hello Juan,
I am not exactly sure, but I think your error might be related to a permission issue. You indeed need to have root privilege to be able to write files in the OpenFOAM installation directory. This is what step 1 is about. If you did step 1 and run all other commands in the same shell session you should not have permission issues. However if you skipped step 1 or ran commands from another shell session you should probably run pretty much all commands with sudo. So you can try running sudo ./makeCCMIO, or go over all the procedure again paying attention to have the right permissions (just in case other steps failed due to permission issues) Let me know how it goes! |
|
January 8, 2025, 08:47 |
|
#8 | |
New Member
Juan
Join Date: Jun 2024
Posts: 3
Rep Power: 2 |
Quote:
It's working now! As you said, I was trying to execute the commands from another shell. I've opened a new terminal and executed all steps again, finally it's working. I've also tried to use the ccmToFoam package and it modifies the mesh from .ccm format into polyMesh without issues. Thank you for your time and support! |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |