2D airfoil simulation

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
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: 2D airfoil simulation

Post by adrianinsaval »

now I'm trying to do a segmented airfoil:
Screenshot_20220909_205644.png
Screenshot_20220909_205644.png (6.05 KiB) Viewed 1574 times
but meshing ends in error:

Code: Select all

--> FOAM FATAL ERROR: (openfoam-2206)
Plane normal not aligned with the coordinate system
    pn = (0.828017607417294 -0.430746258010021 0.35894916494861)

    From Foam::direction Foam::twoDPointCorrector::normalDir() const
    in file twoDPointCorrector/twoDPointCorrector.C at line 240.

FOAM aborting

20:53:23  #0  Foam::error::printStack(Foam::Ostream&) at ??:?
20:53:23  #1  Foam::error::simpleExit(int, bool) at ??:?
20:53:23  #2  Foam::twoDPointCorrector::normalDir() const at ??:?
#3  ? in /opt/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/flattenMesh
20:53:23  #4  ? in /usr/lib/libc.so.6
20:53:23  #5  __libc_start_main in /usr/lib/libc.so.6
#6  ? in /opt/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/flattenMesh
20:53:23  ./Allmesh: line 18: 168646 Aborted                 (core dumped) "$@" > >(tee -a log."$sol") 2> >(tee -a log."$sol" >&2)
20:53:29  Traceback (most recent call last):
20:53:35    File "/home/adrian/.local/share/FreeCAD/Mod/CfdOF/./CfdOF/Mesh/TaskPanelCfdMesh.py", line 382, in openParaview
20:53:35      self.open_paraview = CfdTools.startParaview(case_path, script_name, self.consoleMessage)
20:53:35    File "/home/adrian/.local/share/FreeCAD/Mod/CfdOF/./CfdOF/CfdTools.py", line 1227, in startParaview
20:53:35      CfdConsoleProcess.removeAppimageEnvironment(env)
20:53:35  AttributeError: type object 'CfdConsoleProcess' has no attribute 'removeAppimageEnvironment'
If I open it in paraview anyways it looks horrible:
Screenshot_20220909_205505.png
Screenshot_20220909_205505.png (231.79 KiB) Viewed 1574 times
I think I need to set very low mesh sizes for it to succeed but I don't want the entirety of my domain to have very fine mesh, is there a way to make a volume refinement on the airfoil region before doing the cut?
Attachments
segmented-airfoil-cfd.FCStd
(83.15 KiB) Downloaded 62 times
thschrader
Veteran
Posts: 3122
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D airfoil simulation

Post by thschrader »

Used 2 wings as a start.

chord-length upper wing 400 mm
gap between wings 8 mm.

mesh:
cfmesh, 3 volume refinement stages, 1 surface refinement, 10 boundary-layers.
meshing time approx 25 min.

Fluid air, rho=1,2 kg/m^3, inlet=5 m/s, 0 Pa, 5% turbulence, k-omega model

SimpleFoam converges after 800 iterations, at Res=10^-3, runtime 35 min.

Result:
lift upper wing: 5,4 N/m
lift lower wing: -0,08 N/m (yes, minus lift!)
Would be better to use the upper wing alone...
segmentedAirfoil.FCStd
(741.58 KiB) Downloaded 68 times
meshRefinement.JPG
meshRefinement.JPG (177.24 KiB) Viewed 1487 times
residuals.JPG
residuals.JPG (49.84 KiB) Viewed 1487 times
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: 2D airfoil simulation

Post by techGuy »

Why do I have these black areas around the airfoil in my Paraview output ?

Is this a meshing problem or a solver problem ?
Attachments
SegmentedAirfoil U.png
SegmentedAirfoil U.png (281.1 KiB) Viewed 1079 times
SegmentedAirfoil p.png
SegmentedAirfoil p.png (145.48 KiB) Viewed 1079 times
User avatar
adrianinsaval
Veteran
Posts: 5534
Joined: Thu Apr 05, 2018 5:15 pm

Re: 2D airfoil simulation

Post by adrianinsaval »

what black areas? you mean the faces of the extrusion? try enabling parallel projection view in paraview to not see those.
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: 2D airfoil simulation

Post by techGuy »

what black areas? you mean the faces of the extrusion? try enabling parallel projection view in paraview to not see those.
Much better !
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: 2D airfoil simulation

Post by techGuy »

what black areas? you mean the faces of the extrusion? try enabling parallel projection view in paraview to not see those.
Much better !
techGuy
Posts: 126
Joined: Sat Jun 18, 2022 12:48 am

Re: 2D airfoil simulation

Post by techGuy »

thschrader wrote: Sun Sep 11, 2022 10:07 am mesh:
cfmesh, 3 volume refinement stages, 1 surface refinement, 10 boundary-layers.
meshing time approx 25 min.
...
SimpleFoam converges after 800 iterations, at Res=10^-3, runtime 35 min.
What machine are you using ?
Result:
lift upper wing: 5,4 N/m
lift lower wing: -0,08 N/m (yes, minus lift!)
Would be better to use the upper wing alone...
That is because there is no air flow through the gap and the upper flow is detached by the time it reaches the lower wing.
SegmentedAirfoil-detatched flow.png
SegmentedAirfoil-detatched flow.png (103.99 KiB) Viewed 1017 times
herbk
Veteran
Posts: 2655
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: 2D airfoil simulation

Post by herbk »

thschrader wrote: Sun Sep 11, 2022 10:07 am Result:
lift upper wing: 5,4 N/m
lift lower wing: -0,08 N/m (yes, minus lift!)
Would be better to use the upper wing alone...
Try it... ;)
I would say: without the lower wing the upper wing produces distinctly less lift.
Gruß Herbert
thschrader
Veteran
Posts: 3122
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D airfoil simulation

Post by thschrader »

techGuy wrote: Mon Mar 20, 2023 8:40 pm What machine are you using ?
The sim above was done on a HP-Laptop with intel i5 CPU, 35 min runtime.
I rerun the file on my new Laptop with Intel i7, 2x CPU active.
Now meshing in 9 min, runtime sim 14 min.
thschrader
Veteran
Posts: 3122
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: 2D airfoil simulation

Post by thschrader »

herbk wrote: Tue Mar 21, 2023 7:33 am Try it... ;)
I would say: without the lower wing the upper wing produces distinctly less lift.
Moin Herbert,
you are right.

Both wings: 81,7+3,3=85 N/m total lift
Upper wing alone: 46 N/m lift :o
15 m/s inlet speed, 4 deg AoA

Values in N/m are "computed-lift/mesh-thickness"
You must run the sim to 10E-5 residual cut-off before lift force stabilizes.
big_wing_alone.FCStd
(422.05 KiB) Downloaded 42 times
Post Reply