|
[Sponsors] |
December 7, 2007, 05:17 |
Gmsh and samplesurface
|
#1 |
New Member
maitre touf
Join Date: Mar 2009
Posts: 6
Rep Power: 17 |
Hi,
I generated an unstructured mesh (2d flow around airfoil) with gmsh, and converted it to openfoam. Computation (simplefoam without turbulence) seem to run OK. However, when I sample pressure with samplesurface, the sample is "dirty", there is discrepancy in the results ans the cells are not ordered. When I run with a structured mesh pressure distribution is smooth. Any suggestions? thanks here is my geo file (converted with gmsh2tofoam) claf=0.0005000; clbd=0.300000; DZ3D=0.1000000; Point (1) = {0.000000,10.000000,0.000000,clbd}; Point (2) = {-10.000000,0.000000,0.000000,clbd}; Point (3) = {0.000000,-10.000000,0.000000,clbd}; Point (4) = {1.000000,-10.000000,0.000000,clbd}; Point (5) = {11.000000,-10.000000,0.000000,clbd}; Point (6) = {11.000000,10.000000,0.000000,clbd}; Point (7) = {1.000000,10.000000,0.000000,clbd}; Point (8) = {0.000000,0.000000,0.000000,claf}; Point (1001) = {1.000000,0.001890,0.000000,claf}; Point (1002) = {0.992800,0.003560,0.000000,claf}; Point (1003) = {0.979890,0.006510,0.000000,claf}; Point (1004) = {0.963520,0.010200,0.000000,claf}; Point (1005) = {0.944550,0.014400,0.000000,claf}; Point (1006) = {0.923500,0.018960,0.000000,claf}; Point (1007) = {0.900750,0.023770,0.000000,claf}; Point (1008) = {0.876580,0.028760,0.000000,claf}; Point (1009) = {0.851230,0.033860,0.000000,claf}; Point (1010) = {0.824890,0.039020,0.000000,claf}; Point (1011) = {0.797740,0.044190,0.000000,claf}; Point (1012) = {0.769910,0.049340,0.000000,claf}; Point (1013) = {0.741540,0.054430,0.000000,claf}; Point (1014) = {0.712750,0.059420,0.000000,claf}; Point (1015) = {0.683650,0.064300,0.000000,claf}; Point (1016) = {0.654340,0.069030,0.000000,claf}; Point (1017) = {0.624920,0.073590,0.000000,claf}; Point (1018) = {0.595470,0.077940,0.000000,claf}; Point (1019) = {0.566070,0.082070,0.000000,claf}; Point (1020) = {0.536800,0.085940,0.000000,claf}; Point (1021) = {0.507740,0.089540,0.000000,claf}; Point (1022) = {0.478950,0.092840,0.000000,claf}; Point (1023) = {0.450500,0.095810,0.000000,claf}; Point (1024) = {0.422460,0.098430,0.000000,claf}; Point (1025) = {0.394880,0.100690,0.000000,claf}; Point (1026) = {0.367820,0.102560,0.000000,claf}; Point (1027) = {0.341350,0.104020,0.000000,claf}; Point (1028) = {0.315510,0.105060,0.000000,claf}; Point (1029) = {0.290350,0.105670,0.000000,claf}; Point (1030) = {0.265940,0.105830,0.000000,claf}; Point (1031) = {0.242310,0.105530,0.000000,claf}; Point (1032) = {0.219510,0.104780,0.000000,claf}; Point (1033) = {0.197600,0.103570,0.000000,claf}; Point (1034) = {0.176610,0.101860,0.000000,claf}; Point (1035) = {0.156600,0.099520,0.000000,claf}; Point (1036) = {0.137600,0.096480,0.000000,claf}; Point (1037) = {0.119650,0.092680,0.000000,claf}; Point (1038) = {0.102800,0.088120,0.000000,claf}; Point (1039) = {0.087090,0.082820,0.000000,claf}; Point (1040) = {0.072560,0.076820,0.000000,claf}; Point (1041) = {0.059240,0.070220,0.000000,claf}; Point (1042) = {0.047170,0.063080,0.000000,claf}; Point (1043) = {0.036390,0.055530,0.000000,claf}; Point (1044) = {0.026940,0.047680,0.000000,claf}; Point (1045) = {0.018850,0.039630,0.000000,claf}; Point (1046) = {0.012150,0.031500,0.000000,claf}; Point (1047) = {0.006880,0.023400,0.000000,claf}; Point (1048) = {0.003080,0.015400,0.000000,claf}; Point (1049) = {0.000780,0.007590,0.000000,claf}; Point (1050) = {0.000000,0.000000,0.000000,claf}; Point (1051) = {0.000780,-0.007120,0.000000,claf}; Point (1052) = {0.003080,-0.013550,0.000000,claf}; Point (1053) = {0.006880,-0.019350,0.000000,claf}; Point (1054) = {0.012150,-0.024560,0.000000,claf}; Point (1055) = {0.018850,-0.029240,0.000000,claf}; Point (1056) = {0.026940,-0.033480,0.000000,claf}; Point (1057) = {0.036390,-0.037350,0.000000,claf}; Point (1058) = {0.047170,-0.040930,0.000000,claf}; Point (1059) = {0.059240,-0.044300,0.000000,claf}; Point (1060) = {0.072560,-0.047530,0.000000,claf}; Point (1061) = {0.087090,-0.050670,0.000000,claf}; Point (1062) = {0.102800,-0.053760,0.000000,claf}; Point (1063) = {0.119650,-0.056820,0.000000,claf}; Point (1064) = {0.137600,-0.059840,0.000000,claf}; Point (1065) = {0.156600,-0.062780,0.000000,claf}; Point (1066) = {0.176610,-0.065580,0.000000,claf}; Point (1067) = {0.197600,-0.068130,0.000000,claf}; Point (1068) = {0.219510,-0.070310,0.000000,claf}; Point (1069) = {0.242310,-0.072070,0.000000,claf}; Point (1070) = {0.265940,-0.073410,0.000000,claf}; Point (1071) = {0.290350,-0.074320,0.000000,claf}; Point (1072) = {0.315510,-0.074830,0.000000,claf}; Point (1073) = {0.341350,-0.074930,0.000000,claf}; Point (1074) = {0.367820,-0.074640,0.000000,claf}; Point (1075) = {0.394880,-0.073960,0.000000,claf}; Point (1076) = {0.422460,-0.072920,0.000000,claf}; Point (1077) = {0.450500,-0.071540,0.000000,claf}; Point (1078) = {0.478950,-0.069820,0.000000,claf}; Point (1079) = {0.507740,-0.067800,0.000000,claf}; Point (1080) = {0.536800,-0.065480,0.000000,claf}; Point (1081) = {0.566070,-0.062900,0.000000,claf}; Point (1082) = {0.595470,-0.060070,0.000000,claf}; Point (1083) = {0.624920,-0.057020,0.000000,claf}; Point (1084) = {0.654340,-0.053770,0.000000,claf}; Point (1085) = {0.683650,-0.050330,0.000000,claf}; Point (1086) = {0.712750,-0.046740,0.000000,claf}; Point (1087) = {0.741540,-0.043010,0.000000,claf}; Point (1088) = {0.769910,-0.039170,0.000000,claf}; Point (1089) = {0.797740,-0.035260,0.000000,claf}; Point (1090) = {0.824890,-0.031280,0.000000,claf}; Point (1091) = {0.851230,-0.027290,0.000000,claf}; Point (1092) = {0.876580,-0.023300,0.000000,claf}; Point (1093) = {0.900750,-0.019380,0.000000,claf}; Point (1094) = {0.923500,-0.015580,0.000000,claf}; Point (1095) = {0.944550,-0.011950,0.000000,claf}; Point (1096) = {0.963520,-0.008590,0.000000,claf}; Point (1097) = {0.979890,-0.005630,0.000000,claf}; Point (1098) = {0.992800,-0.003240,0.000000,claf}; Point (1099) = {1.000000,-0.001890,0.000000,claf}; CatmullRom (7) ={1001,1002,1003,1004,1005,1006,1007,1008,1009,101 0,1011,1012,1013,1014,1015,101 6,1017,1018,1019,1020,1021,1022,1023,1024,1025,102 6,1027,1028,1029,1030,1031,103 2,1033,1034,1035,1036,1037,1038,1039,1040,1041,104 2,1043,1044,1045,1046,1047,104 8,1049,1050,1051,1052,1053,1054,1055,1056,1057,105 8,1059,1060,1061,1062,1063,106 4,1065,1066,1067,1068,1069,1070,1071,1072,1073,107 4,1075,1076,1077,1078,1079,108 0,1081,1082,1083,1084,1085,1086,1087,1088,1089,109 0,1091,1092,1093,1094,1095,109 6,1097,1098,1099}; Line (1) = {1001,1099}; Line (2) = {1099,4}; Line (3) = {4,3}; Circle (4) = {3,8,2}; Circle (8) = {2,8,1}; Line (5) = {1,7}; Line (6) = {7,1001}; Line Loop (101) = {2,3,4,8,5,6,7}; Plane Surface (101) = {101}; Line (9) = {4,5}; Line (10) = {5,6}; Line (11) = {6,7}; Line Loop (102) = {1,2,9,10,11,6}; Plane Surface (102) = {102}; e1[]= Extrude {0,0,1.000000} {Surface{101}; Layers{1}; Recombine;}; e2[]= Extrude {0,0,1.000000} {Surface{102}; Layers{1}; Recombine;}; Physical Surface ("inlet") = {e1[3],e1[4],e1[5],e1[6],e2[6],e2[4]}; Physical Surface ("outlet") = {e2[5]}; Physical Surface ("airfoil") = {e1[8],e2[2]}; Physical Surface ("FrontAndBack") = {101,102,e1[0],e2[0]}; Physical Volume ("InternalField") = {e1[1],e2[1]}; Touf |
|
December 8, 2007, 21:53 |
Hi Touf,
I had a quick look a
|
#2 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Touf,
I had a quick look at your .geo but was not able to find nothing wrong after trying both of gmshToFoam and gmsh2ToFoam. Meanwhile searching this forum there seem to be a few things you have to take care of to use sampleSurface. By the way reading Alessandro's recent post it might be better to stick with structured mesh anyway...?? (not sure since I'm not an airfoil simulation expert) Takuya |
|
December 10, 2007, 03:27 |
Hi Takuya,
Thanks for zour
|
#3 |
New Member
maitre touf
Join Date: Mar 2009
Posts: 6
Rep Power: 17 |
Hi Takuya,
Thanks for zour comments. However, I still didnīt find solution to my problem. A stuctured mesh be a solution, but it seems more complicated to generate for multi-elements airfoil. For the unstructured mesh in GMSH, I wrote a script in Scilab that is doing the job "alone". If someone can suggest a guideline for structured mesh for multi-element airfoil, I can try to write a script. Touf |
|
|
|