CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] Regular expressions in cfMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2015, 10:10
Default Regular expressions in cfMesh
  #1
New Member
 
rama13's Avatar
 
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 10
rama13 is on a distinguished road
Greetings to all,

first of all let me thank Creative Fields for their work in cfMesh.

As it is said while presenting the cfMesh 1.0.1 version,

Quote:
Regular expressions reduce the amount of repetitive work needed when setting up a meshing process. Examples are available in singleOrifice and multipleOrifices cases.
However, I am not able to specify the cellSize in multiple patches by using regular expressions. I have also tried to run the singleOrifice and multipleOrifices cases without any chance. Please see images attached where the first has been generated with

localRefinement //with regular expressions
{
"orificeRegion.*"//orificeRegion_S13
{
cellSize 0.06;
}
}

and the second with

localRefinement //only one patch
{
orificeRegion_S13//"orificeRegion.*"
{
cellSize 0.06;
}
}

What do I mean is that in my opinion regular expressions are not considered by cartesianMesh, while if I specify every patch by hand it works.

Since I haven't found anyone else having the same problem I start thinking I'm doing something really stupid. Does anyone has experience of this problem?

Bests,
Damiano
Attached Images
File Type: jpg cfMesh1.jpg (62.8 KB, 27 views)
File Type: jpg cfMesh2.jpg (63.2 KB, 29 views)
__________________
Damiano Natali Eng Phd | R&D and FEA Engineer
________________________________________
Cressall | Optimum Resistor Solutions
Evington Valley Road, Leicester, Leicestershire, LE5 5LZ, UK.
NERs | Load Banks | Marine & Offshore | DBRs | Renewables

Last edited by rama13; June 3, 2015 at 10:23. Reason: completeness
rama13 is offline   Reply With Quote

Old   June 3, 2015, 13:10
Default Another hint...
  #2
New Member
 
rama13's Avatar
 
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 10
rama13 is on a distinguished road
I strongly believe this problem has to deal with my cfMesh installation.

Maybe this helps in finding the culprit: I had cfMesh 1.0 and then moved to v. 1.0.1, maybe some dependencies still rely on the previous version?!

Damiano
__________________
Damiano Natali Eng Phd | R&D and FEA Engineer
________________________________________
Cressall | Optimum Resistor Solutions
Evington Valley Road, Leicester, Leicestershire, LE5 5LZ, UK.
NERs | Load Banks | Marine & Offshore | DBRs | Renewables
rama13 is offline   Reply With Quote

Old   June 4, 2015, 02:58
Smile The happy end!
  #3
New Member
 
rama13's Avatar
 
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 10
rama13 is on a distinguished road
I finally managed to make cfMesh recognize regular expressions.

Maybe this can help someone else in my situation.

First I tried to install the 1.0.1 version with the cfMesh-1.0.1-linux.run file, which is the first proposed by sourceforge.net, and this didn't work.

Then I tried to install by downloading just the cfMesh-v1.0.1.tgz file (from Browse all files) and unpacking it (as it is said in the Creative Fields web site), and it worked!

Hope this helps!

Damiano
__________________
Damiano Natali Eng Phd | R&D and FEA Engineer
________________________________________
Cressall | Optimum Resistor Solutions
Evington Valley Road, Leicester, Leicestershire, LE5 5LZ, UK.
NERs | Load Banks | Marine & Offshore | DBRs | Renewables
rama13 is offline   Reply With Quote

Old   June 4, 2015, 08:44
Default
  #4
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 14
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hello Damiano,

Thank you for letting us know.
We will check what went wrong in the installation package.

Kind Regards,

Franjo
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   June 5, 2015, 06:35
Default
  #5
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 14
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hello Damiano,

We have tested the installer again, and re-confirmed that it works fine.
However, the problems could be caused by some other version of cfMesh available on your computer. Do you source OpenFOAM with some other version of cfMesh from your .bashrc or .cshrc? The installation package adds cfMesh at the end of your path, and therefore is not usable when you have cfMesh already installed and sourced with some other OpenFOAM installation. By compiling the source, it gets compiled into FOAM_USER_LIBBIN and FOAM_USER_APPBIN of your OpenFOAM installation, and is therefore readily usable.
This is also a lesson for us to modify the installer, such that the cfMesh shell always uses the correct version!
I hope this helps!

Franjo
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   June 5, 2015, 11:50
Default
  #6
New Member
 
rama13's Avatar
 
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 10
rama13 is on a distinguished road
Hi Franjo,

it seems I don't source them directly from .bashrc. Of course .bashrc calls the OpenFOAM .bashrc and from there FOAM_USER_APPBIN is sourced.

In order to be sure of installing the correct version I erased manually the binaries such as cartesianMesh, tetMesh and cartesian2DMesh, so that I was no more able to launch any meshing process.

Then I runned the cfMesh-1.0.1-linux.run file, and I was again able to launch cartesianMesh, tetMesh and cartesian2DMesh, so I assumed these had to be version 1.0.1. Is it right?

Thanks again for the help,
Damiano
__________________
Damiano Natali Eng Phd | R&D and FEA Engineer
________________________________________
Cressall | Optimum Resistor Solutions
Evington Valley Road, Leicester, Leicestershire, LE5 5LZ, UK.
NERs | Load Banks | Marine & Offshore | DBRs | Renewables
rama13 is offline   Reply With Quote

Old   June 7, 2015, 17:01
Default
  #7
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 14
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hi Damiano,

Quote:
Originally Posted by rama13 View Post
Hi Franjo,

it seems I don't source them directly from .bashrc. Of course .bashrc calls the OpenFOAM .bashrc and from there FOAM_USER_APPBIN is sourced.

In order to be sure of installing the correct version I erased manually the binaries such as cartesianMesh, tetMesh and cartesian2DMesh, so that I was no more able to launch any meshing process.

Then I runned the cfMesh-1.0.1-linux.run file, and I was again able to launch cartesianMesh, tetMesh and cartesian2DMesh, so I assumed these had to be version 1.0.1. Is it right?

Thanks again for the help,
Damiano
Yes, the that is the correct version. Please do not forget to delet delete libmeshLibrary.so from your FOAM_USER_LIBBIN and FOAM_LIBBIN, too.

Regards,

Franjo
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Reply

Tags
cartesianmesh, cfmesh, regexp, regular expressions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[PyFoam] Using regular expressions on multi-line output GerhardHolzinger OpenFOAM Community Contributions 3 November 5, 2014 10:38
Regular Expressions in OF Config Files Horus OpenFOAM 14 May 3, 2012 04:35
Grouping expressions in CEL foo7 CFX 4 September 21, 2011 09:15
Use of regular expressions for patch names in boundary conditions terrybarnaby OpenFOAM 1 February 10, 2010 10:40
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 11:46


All times are GMT -4. The time now is 05:12.