for i=1,4 do --Prepare unstructured data table data_input_table = { data_format = "unstructured", input_parameters = { -- combined grid and results file name = 'Design'..i..'/Design'..i..'_.bin', options = { input_mode = "replace", --input_mode: "replace" or "append" transient = "off" --transient: either "on" or "off" } } } --Read unstructured data read_dataset(data_input_table) boundary_table1 = { dataset = 1, -- specify the name of the scalar scalar_func = "P", --scalar_func: name or "none" -- boundary types types = {"WINGDOWN","WINGUP"}, --types: name(s), "all", or "none" display_type = "smooth_shading" --display_type: choices also --include constant_shading, --faceted_shading and mesh_shading } --Create boundary surface and assign handle to 'surface_handle1' boundary_surface = create_boundary(boundary_table1) result = integrate_surface(boundary_surface) lift = result.sum_Nz * -2 print(i,lift) text_table = { text = 'Lift: '..format('%6.2f',lift)..' N', position = {5,70}, geometric_color = 'white', size = 16 } fv_script('SIZE 640 480') fv_script('RESTART ALL_NO_DATA_READ restarts/webinar') create_text(text_table) fv_script('PRINT GRAPHICS BMP pictures/script_P_des'..i..'.bmp') fv_script('RESTART ALL_NO_DATA_READ restarts/P_2') create_text(text_table) fv_script('PRINT GRAPHICS BMP pictures/script_P_2_des'..i..'.bmp') fv_script('RESTART ALL_NO_DATA_READ restarts/Cp_plot') create_text(text_table) fv_script('PRINT GRAPHICS BMP pictures/script_Cp_des'..i..'.bmp') fv_script('RESTART ALL_NO_DATA_READ restarts/stream') create_text(text_table) fv_script('PRINT GRAPHICS BMP pictures/script_stream_des'..i..'.bmp') end