From 50441e58400fd4ae4a2f8751201361d722844af4 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 25 Sep 2024 15:21:14 -0400 Subject: [PATCH 1/5] smv vv: create part and slice directories for cases with particle and slice files > 4GB --- vistest/large/part/hot_embers.fds | 23 +++++++++++++++++++ .../large/{plume001 => slice}/plume001.fds | 0 2 files changed, 23 insertions(+) create mode 100644 vistest/large/part/hot_embers.fds rename vistest/large/{plume001 => slice}/plume001.fds (100%) diff --git a/vistest/large/part/hot_embers.fds b/vistest/large/part/hot_embers.fds new file mode 100644 index 000000000..577f504f3 --- /dev/null +++ b/vistest/large/part/hot_embers.fds @@ -0,0 +1,23 @@ +&HEAD CHID='hot_embers' / + +&MESH IJK=10,10,4, XB=0.0,1.0,0.0,1.0,0.0,0.4 / + +&TIME T_END=200 / + +&SURF ID='hot', GEOMETRY='SPHERICAL', HEAT_TRANSFER_COEFFICIENT=0., EMISSIVITY=1., TMP_FRONT=800, RADIUS=0.005 / + +&PART ID='embers', SURF_ID='hot', SAMPLING_FACTOR=1, STATIC=T, QUANTITIES='PARTICLE TEMPERATURE', PROP_ID='ball shape' / + +&PROP ID='ball shape', SMOKEVIEW_ID='SPHERE', SMOKEVIEW_PARAMETERS(1)='D=0.01' / + +&INIT PART_ID='embers', N_PARTICLES=800000, XB=0.0,1.0,0.0,1.0,0.0,0.02 / + +&VENT MB='ZMAX', SURF_ID='OPEN' / + +&BNDF QUANTITY='GAUGE HEAT FLUX', CELL_CENTERED=T / +&BNDF QUANTITY='WALL TEMPERATURE', CELL_CENTERED=T / + +&SLCF PBY=0.5, QUANTITY='RADIATION LOSS', CELL_CENTERED=T / +&SLCF PBY=0.5, QUANTITY='INTEGRATED INTENSITY', CELL_CENTERED=T / + +&TAIL / diff --git a/vistest/large/plume001/plume001.fds b/vistest/large/slice/plume001.fds similarity index 100% rename from vistest/large/plume001/plume001.fds rename to vistest/large/slice/plume001.fds From e5140e5d2b712b1e169f7e24c14c320429d59df0 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 25 Sep 2024 15:47:50 -0400 Subject: [PATCH 2/5] smv vv: add a large boundary file case --- vistest/large/boundary/boundary.fds | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 vistest/large/boundary/boundary.fds diff --git a/vistest/large/boundary/boundary.fds b/vistest/large/boundary/boundary.fds new file mode 100644 index 000000000..0255caf03 --- /dev/null +++ b/vistest/large/boundary/boundary.fds @@ -0,0 +1,22 @@ +&HEAD CHID='boundary',TITLE='Plume whirl case' / + +&MESH IJK=128,128,4, XB=0.0,12.8,0.0,12.8,0.0,0.4/ + +&DUMP NFRAMES=50000 DT_BNDF=0.01 / + +&INIT XB=0.2,12.6,0.2,12.6,0.1,0.3 TEMPERATURE=600.0 / + +&TIME T_END=1000. / Total simulation time + +&REAC SOOT_YIELD=0.01,FUEL='PROPANE'/ + +&VENT MB='XMAX', SURF_ID='OPEN' / + +&SURF ID='BURNER',HRRPUA=600.0 / Ignition source +&VENT XB=6.0,8.0,6.0,8.0,0.2,0.2,SURF_ID='BURNER' / +&VENT XB=6.0,8.0,6.0,8.0,0.3,0.3,SURF_ID='BURNER' / +&OBST XB=6.0,8.0,6.0,8.0,0.2,0.3 / + +&BNDF QUANTITY='WALL_TEMPERATURE' / + +&TAIL / From ef86e4b50a126179ab07b3086f70c13c5053f1a0 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 25 Sep 2024 15:57:06 -0400 Subject: [PATCH 3/5] smv vv: rename large particle file case --- vistest/large/part/{hot_embers.fds => part.fds} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename vistest/large/part/{hot_embers.fds => part.fds} (96%) diff --git a/vistest/large/part/hot_embers.fds b/vistest/large/part/part.fds similarity index 96% rename from vistest/large/part/hot_embers.fds rename to vistest/large/part/part.fds index 577f504f3..1549f38aa 100644 --- a/vistest/large/part/hot_embers.fds +++ b/vistest/large/part/part.fds @@ -1,4 +1,4 @@ -&HEAD CHID='hot_embers' / +&HEAD CHID='part' / &MESH IJK=10,10,4, XB=0.0,1.0,0.0,1.0,0.0,0.4 / From 0c9038fff2e5e3c5e5786150a85c2d3163e7e180 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 25 Sep 2024 16:25:49 -0400 Subject: [PATCH 4/5] smv vv: change end time for large part case --- vistest/large/part/part.fds | 2 +- vistest/large/slice/{plume001.fds => slice.fds} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename vistest/large/slice/{plume001.fds => slice.fds} (95%) diff --git a/vistest/large/part/part.fds b/vistest/large/part/part.fds index 1549f38aa..bc6b1e24b 100644 --- a/vistest/large/part/part.fds +++ b/vistest/large/part/part.fds @@ -2,7 +2,7 @@ &MESH IJK=10,10,4, XB=0.0,1.0,0.0,1.0,0.0,0.4 / -&TIME T_END=200 / +&TIME T_END=60 / &SURF ID='hot', GEOMETRY='SPHERICAL', HEAT_TRANSFER_COEFFICIENT=0., EMISSIVITY=1., TMP_FRONT=800, RADIUS=0.005 / diff --git a/vistest/large/slice/plume001.fds b/vistest/large/slice/slice.fds similarity index 95% rename from vistest/large/slice/plume001.fds rename to vistest/large/slice/slice.fds index 10c352781..e0e4008b1 100644 --- a/vistest/large/slice/plume001.fds +++ b/vistest/large/slice/slice.fds @@ -1,4 +1,4 @@ -&HEAD CHID='plume001',TITLE='Plume whirl case' / +&HEAD CHID='slice',TITLE='Plume whirl case' / &MESH IJK=64,64,64, XB=0.0,1.6,0.0,1.6,0.0,1.6/ From f23102d6eaf3a961e18b986ec799b3ff533cf3a8 Mon Sep 17 00:00:00 2001 From: gforney Date: Wed, 25 Sep 2024 22:45:17 -0400 Subject: [PATCH 5/5] smokeview source: make time render label sizes consistent --- Source/shared/string_util.c | 17 +++++++++++++++++ Source/shared/string_util.h | 1 + Source/smokeview/renderimage.c | 13 +++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Source/shared/string_util.c b/Source/shared/string_util.c index cba308a00..63fa962e2 100644 --- a/Source/shared/string_util.c +++ b/Source/shared/string_util.c @@ -1090,6 +1090,23 @@ char *GetString(char *buffer){ return NULL; } + /* ------------------ Time2RenderLabel ------------------------ */ + +char *Time2RenderLabel(float sv_time, float dt, float maxtime, char *timelabel){ + char *timelabelptr, format[32], percen[2], period[2]; + int ndigits_right, ndigits_left, total_digits; + + strcpy(percen, "%"); + strcpy(period, "."); + ndigits_right = MAX(-log10(dt), 0) + 2; + ndigits_left = MAX(1, log10(maxtime)+1); + total_digits = 1 + ndigits_left + ndigits_right; + sprintf(format, "%s0%i%s%if", percen, total_digits, period, ndigits_right); + sprintf(timelabel, format, sv_time); + timelabelptr=TrimFront(timelabel); + return timelabelptr; +} + /* ------------------ Time2TimeLabel ------------------------ */ char *Time2TimeLabel(float sv_time, float dt, char *timelabel, int fixed_point){ diff --git a/Source/shared/string_util.h b/Source/shared/string_util.h index b22563dc6..b531ddbcf 100644 --- a/Source/shared/string_util.h +++ b/Source/shared/string_util.h @@ -154,6 +154,7 @@ EXTERNCPP float GetMantissaExponent(float x, int *exp10); EXTERNCPP void GetGitInfo(char *githash, char *gitdate); EXTERNCPP char *GetString(char *buffer); EXTERNCPP char *Time2TimeLabel(float time, float dt, char *timelabel, int fixed_point); +EXTERNCPP char *Time2RenderLabel(float time, float dt, float maxtime, char *timelabel); EXTERNCPP char *RandStr(char* str, int length); EXTERNCPP void GetBaseTitle(char *progname, char *title_base); EXTERNCPP void GetTitle(char *progname, char *fulltitle); diff --git a/Source/smokeview/renderimage.c b/Source/smokeview/renderimage.c index 7092bd2a3..4ef0a5057 100644 --- a/Source/smokeview/renderimage.c +++ b/Source/smokeview/renderimage.c @@ -341,9 +341,10 @@ int GetRenderFileName(int view_mode, char *renderfile_dir, char *renderfile_full } code = GetPlot3dTime(&time_local); if(code == 1 && render_label_type == RENDER_LABEL_TIME){ - char timelabel_local[20], *timelabelptr, dt = 1.0; + char timelabel_local[20], *timelabelptr; + float dt = 1.0, maxtime=100000.0; - timelabelptr = Time2TimeLabel(time_local, dt, timelabel_local, force_fixedpoint); + timelabelptr = Time2RenderLabel(time_local, dt, maxtime, timelabel_local); strcat(suffix, "_"); strcat(suffix, timelabelptr); strcat(suffix, "s"); @@ -352,12 +353,12 @@ int GetRenderFileName(int view_mode, char *renderfile_dir, char *renderfile_full else{ float time_local; char timelabel_local[20], *timelabelptr; - float dt; + float dt, maxtime; time_local = global_times[itimes]; - dt = global_times[1] - global_times[0]; - if(dt < 0.0)dt = -dt; - timelabelptr = Time2TimeLabel(time_local, dt, timelabel_local, force_fixedpoint); + dt = ABS(global_times[1] - global_times[0]); + maxtime = global_times[nglobal_times-1]; + timelabelptr = Time2RenderLabel(time_local, dt, maxtime, timelabel_local); strcpy(suffix, timelabelptr); strcat(suffix, "s"); }