Contents
Flow around a triangular body in a chanel
We compare several solvers for a quasi-static displacement and a harmonically imposed displacement.
Chapter 0 : Initialization
addpath('../../SOURCES_MATLAB/'); SF_Start('verbosity',3); SF_core_arborescence('cleanall'); set(0,'defaultAxesFontSize',18);
NOTICE - Initialization already done NOTICE - Verbosity set to 3 : Notice messages NOTICE - Database directory :./WORK/ NOTICE - Working dir does not exist : create it NOTICE - CLEANALL in SF_core_arborescence ; working dir ./WORK/ is now empty NOTICE - Cleaning ALL arborescence ./WORK/
Chapter 1 : Base flow (symmetrical) for Re = 25 ; initial mesh
ffmesh = SF_Mesh('Mesh_ConfinedEllipse.edp','Params',[0 -5 7],'problemtype','2D'); bf = SF_BaseFlow(ffmesh,'Re',1); bf = SF_BaseFlow(bf,'Re',25); bf = SF_BaseFlow(bf,'Re',50); bf = SF_BaseFlow(bf,'Re',100);
WARNING - Your program uses depreciated syntax 'Params' to pass parameters WARNING - It is advised to switch to new method using 'Options', and modify your Freefem solvers to detect parameters using 'getARGV' NOTICE - ### INITIAL MESH CREATED WITH np = 18090 vertices NOTICE - Working with 1 cores WARNING - Folder ./WORK/MESHBF not found : creating it ! NOTICE - SF_BaseFlow : Base flow converged in 4 iterations ; Re = 1; Fx = 339.362 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 25; Fx = 14.1048 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 50; Fx = 7.5288 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 100; Fx = 4.3164
a few plots
figure; subplot(2,1,1); SF_Plot(bf,'mesh','xlim',[-1.2 2]); subplot(2,1,2); SF_Plot(bf,'ux','ColorMap','jet','xlim',[-1.2 2]); hold on; SF_Plot(bf,'psi','contour','only');
Note: To improve runtime build MEX function fftri2gridfast() from fftri2gridfast.c
QS calculations
omega = 1e-10; Yline = linspace(0,max(bf.mesh.points(2,:)),200); % Relative velocities in relative frame ffRR = SF_LinearForced(bf,'omega',omega,'Options','-Vel R -Frame R -Normalize Y') % ALE solver ffALE = SF_LinearForced(bf,'omega',omega,'solver','LinearForced2D_ALE.edp') % ALE solver with elasticity operator instead of Laplacian ffALEe = SF_LinearForced(bf,'omega',omega,'solver','LinearForced2D_ALE.edp','Options','-ALEOP elasticity') % Absolute velocities in absolute frame % (this one does NOT include added stress !) ffAA = SF_LinearForced(bf,'omega',omega,'Options','-Vel A -Frame A -Normalize Y')
NOTICE - ### USING standart StabFem Solver for this class of problems : LinearForced2D.edp ffRR = struct with fields: mesh: [1x1 struct] filename: './WORK/FORCEDFLOWS//FFDATA_000001.txt' DataDescription: 'FORCED LINEAR RESPONSE for a 2D incompressible problem ' datatype: 'ForcedFlow' datastoragemode: 'CxP2P2P1' datadescriptors: 'ux,uy,p' meshfilename: './WORK/MESHES/FFMESH_000001.msh' Re: 100 INDEXING: [1x1 struct] Lambda: 0.0000e+00 + 1.0000e-10i Fy: -11.6439 + 0.0000i Z: 2.5623e+01 + 1.1644e+11i FyAS: 0.6916 vort: [18090x1 double] uxa: [18090x1 double] uya: [18090x1 double] pa: [18090x1 double] ux: [210858x1 double] uy: [210858x1 double] p: [105429x1 double] status: 'loaded' NOTICE - ### USING specified FreeFem++ Solver LinearForced2D_ALE.edp ffALE = struct with fields: mesh: [1x1 struct] filename: './WORK/FORCEDFLOWS//FFDATA_000002.txt' DataDescription: 'FORCED LINEAR RESPONSE for a 2D incompressible problem ' datatype: 'ForcedFlow' datastoragemode: 'CxP2P2P1' datadescriptors: 'ux,uy,p' meshfilename: './WORK/MESHES/FFMESH_000001.msh' Re: 100 INDEXING: [1x1 struct] Lambda: 0.0000e+00 + 1.0000e-10i Fy: -17.3132 + 0.0000i Z: 2.6025e+01 + 1.7313e+11i Fyxi: 0.4191 vort: [18090x1 double] uxa: [18090x1 double] uya: [18090x1 double] pa: [18090x1 double] ux: [210858x1 double] uy: [210858x1 double] p: [105429x1 double] status: 'loaded' NOTICE - ### USING specified FreeFem++ Solver LinearForced2D_ALE.edp ffALEe = struct with fields: mesh: [1x1 struct] filename: './WORK/FORCEDFLOWS//FFDATA_000003.txt' DataDescription: 'FORCED LINEAR RESPONSE for a 2D incompressible problem ' datatype: 'ForcedFlow' datastoragemode: 'CxP2P2P1' datadescriptors: 'ux,uy,p' meshfilename: './WORK/MESHES/FFMESH_000001.msh' Re: 100 INDEXING: [1x1 struct] Lambda: 0.0000e+00 + 1.0000e-10i Fy: -17.2952 + 0.0000i Z: 2.6023e+01 + 1.7295e+11i Fyxi: 0.1467 vort: [18090x1 double] uxa: [18090x1 double] uya: [18090x1 double] pa: [18090x1 double] ux: [210858x1 double] uy: [210858x1 double] p: [105429x1 double] status: 'loaded' NOTICE - ### USING standart StabFem Solver for this class of problems : LinearForced2D.edp ffAA = struct with fields: mesh: [1x1 struct] filename: './WORK/FORCEDFLOWS//FFDATA_000004.txt' DataDescription: 'FORCED LINEAR RESPONSE for a 2D incompressible problem ' datatype: 'ForcedFlow' datastoragemode: 'CxP2P2P1' datadescriptors: 'ux,uy,p' meshfilename: './WORK/MESHES/FFMESH_000001.msh' Re: 100 INDEXING: [1x1 struct] Lambda: 0.0000e+00 + 1.0000e-10i Fy: -16.7533 + 0.0000i Z: 2.6157e+01 + 1.6753e+11i FyAS: 0.6916 vort: [18090x1 double] uxr: [18090x1 double] uyr: [18090x1 double] pr: [18090x1 double] ux: [210858x1 double] uy: [210858x1 double] p: [105429x1 double] status: 'loaded'
Comparing structures
figure; subplot(2,1,1); SF_Plot(ffALE,'uya','xlim',[-1 2]); subplot(2,1,2);SF_Plot(ffAA,'uy','xlim',[-1 2]);
Computing a second base flow with offset
Yrange = [-.02,-.01, 0.01, 0.02]; for i=1:length(Yrange) Y = Yrange(i); ffmesh = SF_Mesh('Mesh_ConfinedEllipse.edp','Params',[Y -5 7],'problemtype','2D'); bf01 = SF_BaseFlow(ffmesh,'Re',1); bf01 = SF_BaseFlow(bf01,'Re',25); bf01 = SF_BaseFlow(bf01,'Re',50); bf01 = SF_BaseFlow(bf01,'Re',100); Fytab(i) = bf01.Fy; end
WARNING - Your program uses depreciated syntax 'Params' to pass parameters WARNING - It is advised to switch to new method using 'Options', and modify your Freefem solvers to detect parameters using 'getARGV' NOTICE - ### INITIAL MESH CREATED WITH np = 17568 vertices NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 4 iterations ; Re = 1; Fx = 334.794 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 25; Fx = 13.8722 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 50; Fx = 7.3563 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 100; Fx = 4.2026 WARNING - Your program uses depreciated syntax 'Params' to pass parameters WARNING - It is advised to switch to new method using 'Options', and modify your Freefem solvers to detect parameters using 'getARGV' NOTICE - ### INITIAL MESH CREATED WITH np = 17849 vertices NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 4 iterations ; Re = 1; Fx = 338.21 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 25; Fx = 14.0215 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 50; Fx = 7.4528 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 100; Fx = 4.2613 WARNING - Your program uses depreciated syntax 'Params' to pass parameters WARNING - It is advised to switch to new method using 'Options', and modify your Freefem solvers to detect parameters using 'getARGV' NOTICE - ### INITIAL MESH CREATED WITH np = 17709 vertices NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 4 iterations ; Re = 1; Fx = 338.186 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 25; Fx = 14.12 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 50; Fx = 7.5825 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 100; Fx = 4.3673 WARNING - Your program uses depreciated syntax 'Params' to pass parameters WARNING - It is advised to switch to new method using 'Options', and modify your Freefem solvers to detect parameters using 'getARGV' NOTICE - ### INITIAL MESH CREATED WITH np = 18734 vertices NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 4 iterations ; Re = 1; Fx = 334.762 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 25; Fx = 14.0688 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 50; Fx = 7.6137 NOTICE - Working with 1 cores NOTICE - SF_BaseFlow : Base flow converged in 5 iterations ; Re = 100; Fx = 4.4139
figure; plot(Yrange,Fytab,'rs',Yrange,bf.Fy+ffALE.Fy*Yrange,'b--',... Yrange,bf.Fy+ffRR.Fy*Yrange,'r--',Yrange,bf.Fy+ffAA.Fy*Yrange,'k--',Yrange,bf.Fy+(ffAA.Fy-ffAA.FyAS)*Yrange,'m--'); xlabel('Y');ylabel('Fy'); legend('Offset','ALE','REL','ABS', 'ABS (no AS)');
Warning: Imaginary parts of complex X and/or Y arguments ignored.
SUMMARY
SF_Status % [[PUBLISH]] % fclose(fopen('SCRIPT_Ellipse.success','w+'));
################################################################################ ... SUMMARY OF YOUR DATABASE FOLDER : ./WORK/ ################################################################################# .... CONTENT OF DIRECTORY ./WORK/MESHES : (list of meshes previously created/adapted ; couples of .msh/.ff2m files ) Index | Name | generation mode | Date | Nv 1 | FFMESH_000001.msh | initial | 22-mars-2023 15:44:39 | 18090 2 | FFMESH_000002.msh | initial | 22-mars-2023 15:52:04 | 17568 3 | FFMESH_000003.msh | initial | 22-mars-2023 15:56:50 | 17849 4 | FFMESH_000004.msh | initial | 22-mars-2023 16:01:58 | 17709 5 | FFMESH_000005.msh | initial | 22-mars-2023 16:06:40 | 18734 ################################################################################# ################################################################################# .... CONTENT OF DIRECTORY ./WORK/BASEFLOWS (couples of .txt/.ff2m files ) Index | Name | Type | Date | Mesh file | Re 1 | FFDATA_000001.txt | BaseFlow | 22-mars-2023 15:45:43 | FFMESH_000001.msh | 1 2 | FFDATA_000002.txt | BaseFlow | 22-mars-2023 15:46:56 | FFMESH_000001.msh | 25 3 | FFDATA_000003.txt | BaseFlow | 22-mars-2023 15:48:13 | FFMESH_000001.msh | 50 4 | FFDATA_000004.txt | BaseFlow | 22-mars-2023 15:49:37 | FFMESH_000001.msh | 100 5 | FFDATA_000005.txt | BaseFlow | 22-mars-2023 15:53:12 | FFMESH_000002.msh | 1 6 | FFDATA_000006.txt | BaseFlow | 22-mars-2023 15:54:21 | FFMESH_000002.msh | 25 7 | FFDATA_000007.txt | BaseFlow | 22-mars-2023 15:55:35 | FFMESH_000002.msh | 50 8 | FFDATA_000008.txt | BaseFlow | 22-mars-2023 15:56:44 | FFMESH_000002.msh | 100 9 | FFDATA_000009.txt | BaseFlow | 22-mars-2023 15:58:03 | FFMESH_000003.msh | 1 10 | FFDATA_000010.txt | BaseFlow | 22-mars-2023 15:59:14 | FFMESH_000003.msh | 25 11 | FFDATA_000011.txt | BaseFlow | 22-mars-2023 16:00:31 | FFMESH_000003.msh | 50 12 | FFDATA_000012.txt | BaseFlow | 22-mars-2023 16:01:52 | FFMESH_000003.msh | 100 13 | FFDATA_000013.txt | BaseFlow | 22-mars-2023 16:03:05 | FFMESH_000004.msh | 1 14 | FFDATA_000014.txt | BaseFlow | 22-mars-2023 16:04:10 | FFMESH_000004.msh | 25 15 | FFDATA_000015.txt | BaseFlow | 22-mars-2023 16:05:19 | FFMESH_000004.msh | 50 16 | FFDATA_000016.txt | BaseFlow | 22-mars-2023 16:06:35 | FFMESH_000004.msh | 100 17 | FFDATA_000017.txt | BaseFlow | 22-mars-2023 16:07:57 | FFMESH_000005.msh | 1 18 | FFDATA_000018.txt | BaseFlow | 22-mars-2023 16:09:13 | FFMESH_000005.msh | 25 19 | FFDATA_000019.txt | BaseFlow | 22-mars-2023 16:10:30 | FFMESH_000005.msh | 50 20 | FFDATA_000020.txt | BaseFlow | 22-mars-2023 16:11:57 | FFMESH_000005.msh | 100 ################################################################################# .... CONTENT OF DIRECTORY ./WORK/FORCEDFLOWS (couples of .txt/.ff2m files ) Index | Name | Type | Date | Mesh file | Re | Lambda | Fy 1 | FFDATA_000001.txt | ForcedFlow | 22-mars-2023 15:50:12 | FFMESH_000001.msh | 100 | 0+1e-10i | -11.6439+2.56229e-09i 2 | FFDATA_000002.txt | ForcedFlow | 22-mars-2023 15:50:56 | FFMESH_000001.msh | 100 | 0+1e-10i | -17.3132+2.60248e-09i 3 | FFDATA_000003.txt | ForcedFlow | 22-mars-2023 15:51:35 | FFMESH_000001.msh | 100 | 0+1e-10i | -17.2952+2.60233e-09i 4 | FFDATA_000004.txt | ForcedFlow | 22-mars-2023 15:51:54 | FFMESH_000001.msh | 100 | 0+1e-10i | -16.7533+2.6157e-09i ################################################################################# .... CONTENT OF DIRECTORY ./WORK/MESHBF (couples of .txt/.ff2m files ) Index | Name | Type | Date | Mesh file | Re 1 | FFDATA_000001.txt | BaseFlow | 22-mars-2023 15:45:40 | FFMESH_000001.msh | 1 2 | FFDATA_000002.txt | BaseFlow | 22-mars-2023 15:53:07 | FFMESH_000002.msh | 1 3 | FFDATA_000003.txt | BaseFlow | 22-mars-2023 15:57:58 | FFMESH_000003.msh | 1 4 | FFDATA_000004.txt | BaseFlow | 22-mars-2023 16:03:00 | FFMESH_000004.msh | 1 5 | FFDATA_000005.txt | BaseFlow | 22-mars-2023 16:07:50 | FFMESH_000005.msh | 1 ################################################################################# ans = struct with fields: MESHES: [1x5 struct] BASEFLOWS: [1x20 struct] FORCEDFLOWS: [1x4 struct] MESHBF: [1x5 struct]