⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lattice.h

📁 基于格子Boltzmann方法开源可视化软件的源代码 具有很高的实用价值。对学习LBM方法及其软件开发非常游泳
💻 H
📖 第 1 页 / 共 2 页
字号:
  int    sigma_btc_spot;  // Param: *sigma_btc;  // Type: double *sigma_btc;  // Comments: Pointer to array for storing break through curve. If sigma_btc_rate <= 0, this will remain unallocated.  //  double *sigma_btc;#endif /* INAMURO_SIGMA_COMPONENT */  // Inflow and outflow conditions for density and velocity.  double rho_in,   rho_out;  double ux_in,    ux_out;  double uy_in,    uy_out;  // Param: G;  // Type: double G;  // Comments: Interaction parameter.  //  double G;  // Param: Gads[NUM_FLUID_COMPONENTS];  // Type: double Gads[NUM_FLUID_COMPONENTS];  // Comments: Adsorption parameters.  //  double Gads[NUM_FLUID_COMPONENTS];  // Param: ns_flag;   // Type: int ns_flag;   // Comments: Flag for how to use the solid density parameter.  // If ns_flag = 0, then initialize the domain uniformly with ns.  // If ns_flag = 1, then read ns values from the ns<LX>x<LY>.bmp file.  // If ns_flag = 2, then read ns mask from ns<LX>x<LY>.bmp -- that is,  // initialize the domain with ns where there are black pixels in the  // ns<LX>x<LY>.bmp file and 0 otherwise.  //  int    ns_flag;   // Param: ns;   // Type: double ns;   // Comments: Solid density parameter for porous media.  //  double ns;   // Param: slice_x  // Param: slice_y  // Type: int  // Comments: Positions of x and y slices to be output to the slice*.m files.  // These override the old slice.in file unless both are set to -1.  int    slice_x;  int    slice_y;  // Param: ic_poisseuille;  // Param: bc_poisseuille;  // Type: int    ic_poisseuille;  // Comments: Flags for poisseuille flow initial condition (ic) and boundary condition (bc).  //  int    ic_poisseuille;  int    bc_poisseuille;  // Param: bc_slip_north;  // Type: int    bc_slip_north;  // Comments: Toggle slip condition on north wall.  //  int    bc_slip_north;#if INAMURO_SIGMA_COMPONENT  // Param: bc_sigma_slip;  // Type: int    bc_sigma_slip;  // Comments: Slip BC for solute on side walls. Will this make a difference on Taylor dispersion results?  NOTE: Only use this for flow through a channel. Slip BC is not implemented for arbitrary geometries.  //  int    bc_sigma_slip;  // Param: bc_sigma_walls;  // Type: int    bc_sigma_walls;  // Comments: Enforce concentration (sigma component) boundary conditions on walls. This will mean skipping bounce back for the sigma component on solids. WARNING: Should only be used for walls on the sides of the domain!  //  int    bc_sigma_walls;#endif /* INAMURO_SIGMA_COMPONENT */  // Flags for pressure and velocity boundaries.  int    pressure_n_in[  NUM_FLUID_COMPONENTS];  int    pressure_s_in[  NUM_FLUID_COMPONENTS];  int    pressure_n_out[ NUM_FLUID_COMPONENTS];  int    pressure_s_out[ NUM_FLUID_COMPONENTS];  int    velocity_n_in[  NUM_FLUID_COMPONENTS];  int    velocity_s_in[  NUM_FLUID_COMPONENTS];  int    velocity_n_out[ NUM_FLUID_COMPONENTS];  int    velocity_s_out[ NUM_FLUID_COMPONENTS];  int    pressure_e_in[  NUM_FLUID_COMPONENTS];  int    pressure_w_in[  NUM_FLUID_COMPONENTS];  int    pressure_e_out[ NUM_FLUID_COMPONENTS];  int    pressure_w_out[ NUM_FLUID_COMPONENTS];  int    velocity_e_in[  NUM_FLUID_COMPONENTS];  int    velocity_w_in[  NUM_FLUID_COMPONENTS];  int    velocity_e_out[ NUM_FLUID_COMPONENTS];  int    velocity_w_out[ NUM_FLUID_COMPONENTS];  // Flags for (inamuro) concentration boundaries.  int    constcon_n_in;  int    constcon_s_in;  int    constcon_n_out;  int    constcon_s_out;  int    constflx_n_in;  int    constflx_s_in;  int    constflx_n_out;  int    constflx_s_out;  int    constcon_e_in;  int    constcon_w_in;  int    constcon_e_out;  int    constcon_w_out;  int    constflx_e_in;  int    constflx_w_in;  int    constflx_e_out;  int    constflx_w_out;  // Flags for zero concentration gradient boundaries.  // These differ from inamuro's concentration flux boundaries  // in that they allow advective flux of the concentration  // across the boundary.  int    zeroconcgrad_n;  int    zeroconcgrad_s;  int    zeroconcgrad_e;  int    zeroconcgrad_w;  // Param: zeroconcgrad_full;  // Type: int    zeroconcgrad_full;  // Comments: The zero concentration gradient can be computed by copying (from the adjacent interior neighbor) either just the unknown distribution functions after streaming or all the distributions after streaming. This flag toggles between those methods (where "full" denotes the latter method).  //  int    zeroconcgrad_full;  // Param: use_colormap;  // Type: int    use_colormap;  // Comments: See the colormap routines in lbio.c to learn about colormap support.  //  int    use_colormap;  // Param: plot_scale_dynamic;  // Type: int    plot_scale_dynamic;  // Comments: Toggle dynamic scaling of the plots. If this is on, color values to be plotted will be dynamically scaled to range between the minimum and maximum values of the data for the current plot. If this is off, color values will be scaled only by the initial value for that quantity (e.g. rho_sigma, rho_A[subs], etc...). NOTE: This is only implemented in rho2bmp() as of 10/15/2004.  //  int    plot_scale_dynamic;  // Param: initial_condition;  // Type: int    initial_condition;  // Comments: See bottom of flags.h for listing/description of initial conditions.  //  int    initial_condition;  // Center and radius of a circle. Used in the initial conditions for  // initializing a bubble in the domain, for instance.  double x0;  double y0;  double r0;  // Param: cut;  // Type: double cut;  // Comments: Cut-off value. Used in the initial conditions for generating static in the two-component case. Sometimes the static needs to be biased toward one component in order for it to evolve stabily.  //  double cut;  // Corner coordinates for a rectangle. Used by initial conditions for  // initializing a square-shaped region in the domain.  double x1, x2;  double y1, y2;  // Factors for setting coordinates relative to the domain size. If  // the absolute coordinates are negative, use these values to set  // the coordinates, e.g. x1 = rel_x1*LX. If these rel_* values are  // also negative, then revert to some default absolute coordinates.  double rel_x1, rel_x2;  double rel_y1, rel_y2;  // Param: dump_rho;  // Type: int    dump_rho;  // Comments: Flags to toggle output of the macroscopic density.  //  int    dump_rho;  // Param: dump_u;  // Type: int    dump_u;  // Comments: Flags to toggle output of the macroscopic velocity.  //  int    dump_u;  // Param: dump_force;  // Type: int    dump_force;  // Comments: Flags to toggle output of the interaction and adsorption forces.  //  int    dump_force;  // Param: dump_vor;  // Type: int    dump_vor;  // Comments: Flags to toggle output of vorticity.  //  int    dump_vor;}; /* struct param_struct */// struct lattice_struct////  - Structure with all the lattice information.////  - Contains arrays of the previously defined structures.//struct lattice_struct{  int    NumNodes;  int    NumTimeSteps;  int    time;  int    periodic_x[ NUM_FLUID_COMPONENTS];  int    periodic_y[ NUM_FLUID_COMPONENTS];#if INAMURO_SIGMA_COMPONENT  int    SizeBTC; // Number of BTC measurements to store.  int    FlowDir; // Direction {1,2} ==> {Horiz,Vert} of flow.#endif /* INAMURO_SIGMA_COMPONENT */  struct param_struct      param;#if DO_NOT_STORE_SOLIDS  struct node_struct       *node;#endif /* DO_NOT_STORE_SOLIDS */  struct pdf_struct        *pdf[        NUM_FLUID_COMPONENTS];  struct macro_vars_struct *macro_vars[ NUM_FLUID_COMPONENTS];  struct bc_struct         *bc[         NUM_FLUID_COMPONENTS];#if NON_LOCAL_FORCES  struct force_struct      *force[      NUM_FLUID_COMPONENTS];#endif /* NON_LOCAL_FORCES */#if STORE_UEQ  struct ueq_struct        *ueq;#endif /* STORE_UEQ */#if POROUS_MEDIA  struct ns_struct         *ns;#endif /* POROUS_MEDIA */};typedef struct lattice_struct *lattice_ptr;struct report_struct{  FILE *file;  char name[1024];};typedef struct report_struct *report_ptr;struct bitmap_file_header{  // 1 2 bfType 19778 must always be set to 'BM' to declare that this is  // a .bmp-file.  char bfType[2];  // 3 4 bfSize ?? specifies the size of the file in bytes.  char bfSize[4];  // 7 2 bfReserved1 0 must always be set to zero.  char bfReserved1[2];  // 9 2 bfReserved2 0 must always be set to zero.  char bfReserved2[2];  // 11 4 bfOffBits 1078 specifies the offset from the beginning of the  // file to the bitmap data.  char bfOffBits[4];};struct bitmap_info_header{  // 15 4 biSize 40 specifies the size of the BITMAPINFOHEADER structure,  // in bytes.  char biSize[4];  // 19 4 biWidth 100 specifies the width of the image, in pixels.  char biWidth[4];  // 23 4 biHeight 100 specifies the height of the image, in pixels.  char biHeight[4];  // 27 2 biPlanes 1 specifies the number of planes of the target device,  // must be set to zero. [DT: Should be set to one, right? Not zero.]  char biPlanes[2];  // 29 2 biBitCount 8 specifies the number of bits per pixel.  char biBitCount[2];  // 31 4 biCompression 0 Specifies the type of compression, usually set  // to zero (no compression).  char biCompression[4];  // 35 4 biSizeImage 0 specifies the size of the image data, in bytes.  // If there is no compression, it is valid to set this member to zero.  char biSizeImage[4];  // 39 4 biXPelsPerMeter 0 specifies the the horizontal pixels per meter  // on the designated targer device, usually set to zero.  char biXPelsPerMeter[4];  // 43 4 biYPelsPerMeter 0 specifies the the vertical pixels per meter  // on the designated targer device, usually set to zero.  char biYPelsPerMeter[4];  // 47 4 biClrUsed 0 specifies the number of colors used in the bitmap,  // if set to zero the number of colors is calculated using the biBitCount  // member.  char biClrUsed[4];  // 51 4 biClrImportant 0 specifies the number of color that are  // 'important' for the bitmap, if set to zero, all colors are important.  char biClrImportant[4];};struct rgb_quad{  // 1 1 rgbBlue - specifies the blue part of the color.  char Blue;  // 2 1 rgbGreen - specifies the green part of the color.  char Green;  // 3 1 rgbRed - specifies the red part of the color.  char Red;  // 4 1 rgbReserved - must always be set to zero.  char Reserved;};#include "lattice.c"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -