Skip to content
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]
皮肤
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • 默认(不使用皮肤)
  • 不使用皮肤
折叠
CFD中文网

CFD中文网

C

Chase

@Chase
关于
帖子
4
主题
1
群组
0
粉丝
0
关注
0

帖子

最新

  • 边界条件tableFile读取错误问题
    C Chase

    @Hope 楼主有没有ESDU的document呀,风剖速度和湍流强度以及风谱,没订阅,也搜索不到


  • UDF 想用CDRFG生成LES的入口边界湍流,但是UDF一直编译报错,Profile也只能空间时间二选一,请大佬们指教一下UDF编写
    C Chase

    #include "udf.h"
    #include "unsteady.h"
    #include "profile.h"
    #include <stdio.h>
    #include <stdlib.h>

    #define MAX_POINTS 4000
    #define MAX_TIMESTEPS 997
    #define FILENAME "velocity_data.csv"

    typedef struct {
    double x, y, z;
    double u[MAX_TIMESTEPS];
    } PointData;

    void read_data(PointData* points) {
    FILE* file = fopen(FILENAME, "r");
    if (file == NULL) {
    printf("Error: Could not open file.\n");
    exit(1);
    }

    for (int i = 0; i < MAX_POINTS; i++) {
        fscanf(file, "%lf,%lf,%lf", &points[i].x, &points[i].y, &points[i].z);
        for (int j = 0; j < MAX_TIMESTEPS; j++) {
            fscanf(file, ",%lf", &points[i].u[j]);
        }
    }
    
    fclose(file);
    

    }

    DEFINE_PROFILE(unsteady_velocity, thread, position)
    {
    real x[ND_ND];
    real t = CURRENT_TIME;
    int time_step = N_TIME;
    PointData points[MAX_POINTS];
    face_t f;

    read_data(points);
    
    begin_f_loop(f, thread)
    {
        F_CENTROID(x, f, thread);
        for (int i = 0; i < MAX_POINTS; i++) {
            if (x[0] == points[i].x && x[1] == points[i].y && x[2] == points[i].z) {
                F_PROFILE(f, thread, position) = points[i].u[time_step];
                break;
            }
        }
    }
    end_f_loop(f, thread)
    

    }


  • UDF 想用CDRFG生成LES的入口边界湍流,但是UDF一直编译报错,Profile也只能空间时间二选一,请大佬们指教一下UDF编写
    C Chase

    参照论文Consistent inflow turbulence generator for LES evaluation of wind-induced responses for tall buildings,已经得到目标风剖面的入口边界上的坐标(x,y,z)和对应每个时间步的风速。


  • LES定义入口速度的问题(DSRFG方法)
    C Chase

    @xzdbjx 大佬,可以提供一下编译进Fluent里面的udf吗? CFD小白,自己写的总是报错:zoule:

  • 登录

  • 登录或注册以进行搜索。
  • 第一个帖子
    最后一个帖子
0
  • 最新
  • 版块
  • 东岳流体
  • 随机看[请狂点我]