Computational Fluid Dynamics (CFD) workbench using OpenFOAM

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

User avatar
oliveroxtoby
Posts: 437
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Tue Jun 13, 2017 9:40 pm

wafi wrote:
Sun Jun 11, 2017 7:27 am
after testing and play around a little bit, I think there are some bugs:
1. as mentioned earlier not only the figures of fluid properties are not correctly shown, if edit the values again, also the figures of turbulence etc will change due to scaling and one has to be careful, not to miss the change, otherwise the results are not correct.
I've been looking at this a bit and it looks like there is a way to sort it out, thanks to Werner.
2. also mentioned earlier, to choose the references to create the mesh regions have to be clicked at the screen, no chance to use a list
Again a good point, but we probably can't prioritise this for a bit, so a contribution would be great.
3. MAIN PROBLEM: in the boundary conditions of a non viscose wall it is possible to select from a list the faces, but one have to click one by one, not able to select a larger number in one go, that`s not the real problem, but writing the case some of these faces will be stored under default faces. I have tried several ways to avoid this, i.e. collecting the different parts in one boundary (keel, rudder, hull), creating single boundary conditions for keel, hull, rudder, creating one fusion of keel, hull, rudder and having one boundary condition ... always same problem, they are stored in the boundary condition(s), but writing the case some faces will be default faces. It`s not even clear why some will be default conditions... one time the port side face of the hull is in the default faces, next time, the starboard side ... or faces of keel, sometimes some from port side, sometimes the bottom plate is missing, sometimes all faces exclusive bottom face ... whatever.
This is odd. First question: With which mesher are you having this problem?
Please provide all the information requested in this post before reporting problems with CfdOF.
wafi
Posts: 81
Joined: Sat Oct 15, 2016 8:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby wafi » Wed Jun 14, 2017 4:53 am

Hi Oliver,

with the Cartesian mesher. But once again, not the mesher is the problem. The mesher is working excellent. In the file "createPatchDict" faces which were defined as i.e. "hull" were suddenly defined as "default Faces". And that is what I do not understand. In the refinement with the region tool all faces belonging to the "hull" were recognized and the refining was done properly.
User avatar
oliveroxtoby
Posts: 437
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Wed Jun 14, 2017 5:53 am

wafi wrote:
Wed Jun 14, 2017 4:53 am
with the Cartesian mesher. But once again, not the mesher is the problem. The mesher is working excellent. In the file "createPatchDict" faces which were defined as i.e. "hull" were suddenly defined as "default Faces". And that is what I do not understand. In the refinement with the region tool all faces belonging to the "hull" were recognized and the refining was done properly.
The mesher selected has some influence on the method of detecting the boundaries. If you can can share a minimal example that demonstrates the bug, we will have a look.
Please provide all the information requested in this post before reporting problems with CfdOF.
wafi
Posts: 81
Joined: Sat Oct 15, 2016 8:45 am

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby wafi » Wed Jun 14, 2017 6:09 am

Hi Oliver,

please note attached file. I had to delete the meshing due to size.
test.fcstd
testfile
(797.87 KiB) Downloaded 40 times
Result of this model, Keel and rudder are defined as hull, port and starboard side of hull, are placed in the default faces.

here a summery of "createPatchDict"

name hull;

patchInfo
{
type wall;
}

constructFrom patches;

patches ( face6 face7 face8 face9 face10 face11 face12 face13 face14 face15 face17 face18 face19 face20 face21 face22 face23 face24 face25 face26 face27 face28 face29 face30 face31 face32 face33 face34 face35 face36 face37 face38 face39 face41 face42 face43 face44 face45 face46 face47 face48 face49 face50 face51 face53 face55 face56 face57 face58 face59 face60 face61 face62 face63 face64 face65 face68 face69 face70 face71 face72 face73 face74 face75 face76 face77 face78 face79 face80 face81 face82 face83 face84 face85 face86 face87 face88 face89 face90 face91 face92 face93 face94 face95 face96 face97 face98 face99 face100 face101 face102 face103 face104 face105 );
}

{
name defaultFaces;

patchInfo
{
type patch;
}

constructFrom patches;

patches ( face16 face40 face52 face54 face66 face67 );
}
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby HoWil » Wed Jun 14, 2017 12:28 pm

Hi,

I am a linux user and here some first impressions of my first installation and simulation-run.

I installed openfoam 4.0 from "https://openfoam.org/download/4-1-ubuntu/" and upgraded to 4.1 as described.
After that I added gnuplot from the repo with

Code: Select all

sudo apt-get install gnuplot python-gnuplot
After that I had some problems with your preferences-dialog for your workbench in FC.
I would like to have the possibility to manually set file paths. This enables e.g. the use of an installed version of gmsh and in parallel the use of a downloaded version. The standard gmsh verion in the repo is to old and the official from gmsh.info comes as .tgz and can be run after unzipping.

I do not know if the prerequirements-checker is working on Linux. Should it work or is it only for WIN?
The installation of cfMesh from the FC-Preferences page results in "

Code: Select all

Error downloading cfMesh: [Errno 2] No such file or directory: '/home/username/OpenFOAM/username-4.1/cfMesh-v1.1.2.tar.gz'
".

I tried the elbow example from https://github.com/opensimsa/opensim/tr ... /CFD/Elbow and it did work with gmesh and without cfMesh. The only setting I had to change was the max. mesh size was set to 0.0 otherwise I got "Error : Self intersecting surface mesh, computing intersections (this could take a while)".

Do you plan to give some parts of your work back to FEM-wb? I like your 'advanced' dialog for selecting boundary conditions and would love to see it in FEM-wb!!!

Looking forward to see more if this. 8-)

BR,
HoWil

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11283 (Git)
Build type: None
Branch: master
Hash: dd48cc5f2b017a3cfd2374933441d6b5bf96cabf
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
Kunda1
Posts: 8772
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Kunda1 » Wed Jun 14, 2017 1:12 pm

@HoWil FYI if you find anymore prerequisite dependency checker issues, please also post them to: https://github.com/FreeCAD/FreeCAD-addons/issues/29

Edit: removed typo emoji that crept in to the post.
Last edited by Kunda1 on Wed Jun 14, 2017 1:35 pm, edited 1 time in total.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby HoWil » Wed Jun 14, 2017 1:29 pm

BTW thx for the very very nice tutorials for openfoam and calculix in combination with FC:
e.g.:
https://github.com/opensimsa/opensim/bl ... thHole.pdf
see
https://github.com/opensimsa/opensim/tr ... umentation
HoWil
Posts: 1199
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby HoWil » Wed Jun 14, 2017 1:40 pm

Kunda1 wrote:
Wed Jun 14, 2017 1:12 pm
:cry: @HoWil FYI if you find anymore prerequisite dependency checker issues, please also post them to: https://github.com/FreeCAD/FreeCAD-addons/issues/29
8-) why the :cry: ?
Also @oliveroxtoby ,@johan and (@abogaers) I just wondered ...
* If you could also use matplotlib instead of gnuplot.. would reduce the number of packages needed.
* If you could also check/use the settings for gmsh in FEM-wb

BR,
HoWil
User avatar
Kunda1
Posts: 8772
Joined: Thu Jan 05, 2017 9:03 pm

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby Kunda1 » Wed Jun 14, 2017 1:46 pm

:lol: @HoWil it was a typo! I edited the post with the hope that you wouldn't misconstrue :oops:
Cheers!
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
oliveroxtoby
Posts: 437
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: Computational Fluid Dynamics (CFD) workbench using OpenFOAM

Postby oliveroxtoby » Thu Jun 15, 2017 6:48 am

wafi wrote:
Wed Jun 14, 2017 6:09 am
Hi Oliver,

please note attached file. I had to delete the meshing due to size.
test.fcstd
Thank you. Very helpful for debugging. We will investigate as soon as we are able.
Please provide all the information requested in this post before reporting problems with CfdOF.