CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   New guy with questions - - - - (https://www.cfd-online.com/Forums/openfoam/218411-new-guy-questions.html)

JoeT June 19, 2019 16:58

New guy with questions - - - -
 
Hello.

I am interested in learning to use either openFOAM or SU2. Both are much more complex than the CFD software I have been using. They are not user friendly. But, I like a challenge.

It seems to me they are used a lot for flow analysis in an enclosure, such as a pipe. That's great, but I am interested in airplane design.

Can someone direct me to tutorial videos which show how to load in a mesh model, preferably from SolidWorks (STL ASCII) or NeTFAB? Then set up the analysis parameters, run the problem, and extract lift and drag for the whole vehicle and then sections of the vehicle's wing for aero loads development?

I am getting rather excited about this software. I hope I can master it - well, maybe just learn how to use it!!!

;)

Regards,
Joe T.

Tobi June 24, 2019 04:33

Hi Joe,

well, learning FOAM is not as difficult as it was 9 years ago. During the last decade, the community for OpenFOAM grew up and people came together to built different pages such as:
  • openfoamwiki
  • ESI openFOAM wiki
  • Extensions
  • ...

Two years ago I would just mention my Screencasts, but they are not for free anymore. However, you can easily get information in the world wide web. E.g., if you are searching for lift/drag coefficient calculation, there are tutorials inside the base-foam-folders, community competitions etc.

https://holzmann-cfd.de/openfoam/com...y-competitions
https://holzmann-cfd.de/publications...as-competition

And so on (:
Summing up, you will find the information you need.
Otherwise, you can ask here (cfd-online). However, if your question is not in an advanced level, you can be sure that this question was asked already here.

elvis June 24, 2019 10:17

Hi,

not to forget there are various products out there that include OpenFOAM inside ( do not know if SU2 is included somewhere)

https://www.symscape.com/product/caedium

https://engys.com/products/helyx-os "more userfriendly meshing"

more in https://openfoamwiki.net/index.php/GUI

JoeT June 29, 2019 12:13

Been out a while
 
All,

I have been away from home for a while. I am back now and have a lot of questions. I will have time to start the 'never ending question train' a little later.

Right now, 'Honey Doos.'

Joe T.

JoeT June 29, 2019 12:41

Meshing Quesition
 
All,

I have been using 'Stallion 3D' for my CFD work. It seems to provide the information I need, but it could be greatly improved with respect to how to extract the needed data. But, that is for a later discussion.

I create my CAD models in CATIA. Since they are assemblies, I have to save them as a STP file.

I then send them to my SolidWorks station. Once I open the file, I can save it as an TL file - either ASCII or BINARY. Stallion 3D requires an STL ASCII format.

Once saved as an STL ASCII file, I send it to NetFab. Using NetFab, I can 'heal' any problem meshes, make sure all triangles are oriented properly, then save it.

From there, I can open it in Stallion 3D.

Can an STL ASCII mesh be opened in OpenFOAM?

Also, if y'all don't know this, you can join the EAA (Experimental Aircraft Association) and one of the EAA's benefits is a free 'Student and Teachers' SolidWorks License. Annual membership to the EAA is only $40.

Regards,
Joe T.

JoeT June 29, 2019 15:14

What I want OpenFOAM to do
 
Here are the things I would like to be able to do with OpenFOAM:

1.) Get basic aerodynamic data such as lift, drag, forces, moments, etc.

2.) Be able to isolate components, such as a wing or canard, and get the same data as in #1 above.

3.) Get Cp, Mach, etc., data for any cut across a wing, canard, or fuselage.

4.) Streamlines

5.) Pressure map

6.) Aerodynamic loads, which includes being able to break lifting surfaces into small sections, getting twist, shear and force for each section. The twist has to be about the leading edge of the surface at that panel's location.

7.) Hinge moments.


I would also like to be able to investigate EDFs (Electric Ducted Fans). I would like to be able to have the incoming flow accelerated by the fan and get static pressure and total pressure in front of the blades and after the blades. Also, exhaust velocity and electric motor temperature.

Can OpenFoam do this?

Regards,
Joe T.

JoeT July 7, 2019 21:28

Well, another question - - - -

I have installed OpenFOAM for Windows 10. But, the DOCKER terminal tells me I need AMD-V installed (I have an AMD RYZEN 7 1800 processor). I found a video on how to do that, but I am REALLY nervous.

Basically, I need to change the BIOS. I am not comfortable doing that.

The STALLION 3D ran seamlessly utilizing all 8 of my cores. I assume this AMD-V is what 'tells' the OpenFOAM software to use all of the cores. Or, maybe not - - - -

Any suggestions?

Regards,
Joe T.

akidess July 8, 2019 03:24

AMD-V has nothing to do with OpenFOAM. It's there for the hardware virtualization using Docker. You'll have to deal with performance loss if you use virtualization without hardware support (enabling AMD-V should have no side-effects). If you really need the performance, having native Linux is the way to go.

Time4Tea July 8, 2019 15:15

Hi there JoeT,


I'm fairly new to OpenFOAM myself; however, I've been using FLUENT for a few years and am now learning OF and I think I can help answer some of your questions:


Firstly, one of the best sources of info I have found is (fairly obviously) the User Guide here on openfoam.org. You may have seen it already, but if not, I highly recommend you go through the three tutorials and then start reading through the other sections in detail.


Another great resource is this site - there is a very useful 'getting started' thread here.



Quote:

Originally Posted by JoeT (Post 737532)
Can an STL ASCII mesh be opened in OpenFOAM?



There is a whole section in this forum that deals with meshing. This page on the OF Wiki has a particularly useful diagram that shows what mesh formats can be imported into OF. Foam uses its own mesh format, but it has tools that can convert some third-party mesh formats into OF format.


However, when you say STL, I believe that is a geometry format, rather than a mesh. OpenFOAM (like any CFD code) operates on a finite-volume mesh, which needs to be created from the geometry data. So, I think you need to either look into learning how to use the snappyHexMesh meshing tool in OF (assuming the geometry is fairly complex), or otherwise look into a different application that can mesh the geometry before importing into OF.

Time4Tea July 8, 2019 15:27

Quote:

Originally Posted by JoeT (Post 737548)
Here are the things I would like to be able to do with OpenFOAM:

1.) Get basic aerodynamic data such as lift, drag, forces, moments, etc.

2.) Be able to isolate components, such as a wing or canard, and get the same data as in #1 above.

3.) Get Cp, Mach, etc., data for any cut across a wing, canard, or fuselage.

4.) Streamlines

5.) Pressure map

6.) Aerodynamic loads, which includes being able to break lifting surfaces into small sections, getting twist, shear and force for each section. The twist has to be about the leading edge of the surface at that panel's location.

7.) Hinge moments.


These are all postprocessing tasks, so you would need to refer to this section of the User Guide.


(1) It certainly has functions to calculate lift/drag forces on surfaces.



(2) As long as you use separate boundary patches to define those components, they can be isolated.


(3)(4)(5) All of this can be plotted quite easily in Paraview. You can create a slice plane and then create plots of these different variables.


(6) Same answer to (1), I think, although I'm not sure if it has these specific things 'built in'.



(7) Not sure what 'hinge moments' are.


In general, in OF you have access to the source code and all of the raw data in ASCII format, so if you have the skill and the will, literally anything can be done, in principle.


Quote:

Originally Posted by JoeT (Post 737548)
I would also like to be able to investigate EDFs (Electric Ducted Fans). I would like to be able to have the incoming flow accelerated by the fan and get static pressure and total pressure in front of the blades and after the blades. Also, exhaust velocity and electric motor temperature.


Can OpenFoam do this?


I'm not 100% sure if OF has this feature 'built in'. Perhaps someone else can answer that one?

JoeT July 12, 2019 19:19

1 Attachment(s)
Quote:

Originally Posted by Time4Tea (Post 738352)
Hi there JoeT,


I'm fairly new to OpenFOAM myself; however, I've been using FLUENT for a few years and am now learning OF and I think I can help answer some of your questions:


Firstly, one of the best sources of info I have found is (fairly obviously) the User Guide here on openfoam.org. You may have seen it already, but if not, I highly recommend you go through the three tutorials and then start reading through the other sections in detail.


Another great resource is this site - there is a very useful 'getting started' thread here.


There is a whole section in this forum that deals with meshing. This page on the OF Wiki has a particularly useful diagram that shows what mesh formats can be imported into OF. Foam uses its own mesh format, but it has tools that can convert some third-party mesh formats into OF format.


However, when you say STL, I believe that is a geometry format, rather than a mesh. OpenFOAM (like any CFD code) operates on a finite-volume mesh, which needs to be created from the geometry data. So, I think you need to either look into learning how to use the snappyHexMesh meshing tool in OF (assuming the geometry is fairly complex), or otherwise look into a different application that can mesh the geometry before importing into OF.



Below is an example of the mesh I create to use in Stallion 3D. It is an STL (ASCII) file - not Binary - which has been created using SolidWorks then NetFab. This is the NetFab product. This is how I have to create the STL ASCII) files to use in Stallion 3D.

I'll reply more later.

Regards,
Joe T.

Here is more on the STL (ASCII) file format:


STLA Files
ASCII stereolithography files

STLA is a data directory which contains examples of "ASCII STL" files. "STL" stands for "stereolithography", and indicates that the primary purpose of this file format is to describe the shape of a 3D stationary object.

Stereolithography is a means of creating physical 3D models of such objects, using resin or carefully cut and joined pieces of paper.

An ASCII or binary STL file usually has a filename extension of ".stl".

An STL file contains a description of the surface of a solid that has been decomposed into triangles. The vertices of the triangles should be listed in counterclockwise order, as viewed from outside the surface. A normal vector for the triangle may also be listed.

The file begins with a solid record, (which can include a name for the object), and ends with an endsolid record. Each triangle begins with a facet record and ends with an endfacet record. The normal vector, if given, is included as part of the facet record, and is identified by the normal keyword. The normal vector should have unit length. The three vertices of the triangle are delimited by outer loop and endloop records. Each vertex is described on a vertex record that lists its (X,Y,Z) coordinates.

An ASCII STL file for a four-face figure that's a slice of a cube would be:

solid cube_corner
facet normal 0.0 -1.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 1.0 0.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 1.0 0.0 0.0
endloop
endfacet
facet normal -1.0 0.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 0.0 1.0
vertex 0.0 1.0 0.0
endloop
endfacet
facet normal 0.577 0.577 0.577
outer loop
vertex 1.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
endsolid

(Thanks to Mike Amling for correcting a bad normal vector in this example!)

The facet record has the form:

The normal vector, 3 floating values of 4 bytes each;
vertex 1 coordinates, 3 floating values of 4 bytes each;
vertex 2 coordinates, 3 floating values of 4 bytes each;
vertex 3 coordinates, 3 floating values of 4 bytes each;

STLA File Characteristics:

3D;
ASCII;
No color information;
Normal vectors are associated with faces;
Triangulated surfaces;
No compression;
1 image;

Time4Tea July 18, 2019 09:30

@JoeT: Thanks for posting that info; however, as I mentioned before, my understanding is that an STL file is not a finite-volume mesh file in a format that can be directly imported into OpenFOAM.

If you look at the chart at the wiki link I posted previously, it indicates that STL files cannot be directly imported into OF. It looks like you would need to use Netgen or SHM to convert the STL into a mesh format that OF can read.

I hope this helps.

JoeT August 23, 2019 23:09

Mea Culpa
 
All,

It's been a while since I lasted visited this site. I've been busy, for a retired guy. But, I have to admit I have a problem that is probably easy to fix, I just don't know how.

I installed Ubuntu easily and got out my old 'Unix Bible' and started playing with Ubuntu. Next, I downloaded OpenFoam for Linux and when I tried to start OpenFoam, I accidently (stupidly??) clicked to always open with text editor. Well, that was studpid! I wasn't thinking. I knew better, but stuff happens.

Obviously, OpenFoam won't launch. So, how do it remove the TEXT FILE extention? I have uninstalled OpenFoam and reinstalled it many times. But, it now always has that extension.

This problem is why I loaded an OpenFoam version for Win10 and then read where I needed AMD-V.

Any help is greatly appreciated.

Regards,
Joe T.

Time4Tea August 24, 2019 09:37

Hi JoeT,

It seems you have a couple of misconceptions about how Linux/OF work:

Firstly, unlike Windows, there are no file extensions in Linux. By the sound of it, you tried to open OpenFOAM via Ubuntu's graphical file browser program. So, that may have created an association within the file browser that links the OF application to the text editor. But, I think you can safely ignore this, because ...

Misconception #2 is that OpenFOAM is not a graphical program, it runs on the Linux command line (although the visualization tool, Paraview, is graphical, it is common to launch that from OpenFOAM in the CLI). So, there is not much sense in trying to run OF from a graphical file browser. Instead, you need to run it from the (command line) terminal program that is built into Ubuntu. In fact, more specifically, an OF application should be run from within the folder structure of a CFD case that you want to run, which has already been set up. So, there is some directory/file setup that needs to be done, before you actually invoke an OF application.

Another possible misconception is that OF is not a single Application program - it is a collection of applications, tools and libraries for performing CFD analysis on sets of data. There is no single 'OpenFOAM' application. Which application you use will depend on the type of analysis you want to perform (i.e. incompressible, compressible, multiphase).

I strongly recommend you work through the tutorials at the start of the user guide. It will help you a lot to understand how it all works.


All times are GMT -4. The time now is 00:40.