Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEVC or CTRL controlled vents on mesh boundaries #250

Closed
JakeOShannessy opened this issue Mar 31, 2017 · 6 comments
Closed

DEVC or CTRL controlled vents on mesh boundaries #250

JakeOShannessy opened this issue Mar 31, 2017 · 6 comments
Assignees

Comments

@JakeOShannessy
Copy link
Contributor

I'm having issues where VENTs on mesh boundaries are not displayed as added or removed as they would be when not on a mesh boundary. This is does not appear to be an FDS issue as the flows are properly affected as if the vent was added or removed.

Below is a small example which demonstrates removing extract vents at 5 s, one vent on a mesh boundary and the other not. The behaviour of the two is different. In the .smv file there are 3 CLOSE_VENT entries which makes sense to me, but it is not reflected in the display.

This was tested with FDS 6.5.3 and SMV 6.4.4 on Windows.

&HEAD CHID='VentCTRLMeshBoundary' /

&TIME T_END=10.0 /

&DUMP NFRAMES=40 /

&MESH ID='LowerMesh' IJK=10,10,5 XB=0,1,0,1,0,0.5 /
&MESH ID='UpperMesh' IJK=10,10,5 XB=0,1,0,1,0.5,1 /

&OBST XB=0,1,0,1,0.4,0.5 /

&VENT ID='OpenTop' SURF_ID='OPEN' XB=0,1,0,1,1,1 /
&VENT ID='OpenBottom' SURF_ID='OPEN' XB=0,1,0,1,0,0 /

&DEVC ID='Timer' QUANTITY='TIME' SETPOINT=5 XYZ=0.2,0.2,0.2 INITIAL_STATE=.TRUE. /

&VENT ID='ExtractA' SURF_ID='ExtractSURF' DEVC_ID='Timer'
      XB=0.2,0.8,0.2,0.8,0.5,0.5 /

&VENT ID='ExtractB' SURF_ID='ExtractSURF' DEVC_ID='Timer'
      XB=0.2,0.8,0.2,0.8,0.4,0.4 /

&SURF ID='ExtractSURF' VEL=2 COLOR='GREEN' /

&SLCF ID='VelocitySlice' QUANTITY='VELOCITY' VECTOR=.TRUE. PBX=0.5 /

&TAIL /
@gforney gforney self-assigned this Mar 31, 2017
@gforney
Copy link
Contributor

gforney commented Mar 31, 2017

I'll take a look at it.

@gforney
Copy link
Contributor

gforney commented Apr 3, 2017

jake,
I'll post some smokeviews with this fix tomorrow.. In the mean time, since you can build smokeview, try updating your repo and see if my latest changes fixes this problem.

let me know if you see any problems.
glenn

@JakeOShannessy
Copy link
Contributor Author

Thanks Glenn,

I built 69c9429. I had to make a minor adjustment to get it to compile as the variable vi was returned out of scope (I simply moved it into a higher scope). After compiling the changed worked perfectly (see image below).

combined

I made the following change to get it to compile for testing. It's not actually valid and shouldn't be used, I'm just including it to highlight the problem I had.

diff --git a/Source/smokeview/readsmv.c b/Source/smokeview/readsmv.c
index 92b0ab1..ddfb525 100644
--- a/Source/smokeview/readsmv.c
+++ b/Source/smokeview/readsmv.c
@@ -551,6 +551,7 @@ void InitMesh(meshdata *meshi){
 ventdata *GetCloseVent(meshdata *ventmesh, int ivent){
   ventdata *close_vent, *vdummy_start;
   int i;
+  ventdata *vi;
 
   close_vent = ventmesh->ventinfo+ivent;
   if(close_vent->dir2==XDIR&&close_vent->imin>0&&close_vent->imax<ventmesh->ibar)return close_vent;
@@ -558,8 +559,7 @@ ventdata *GetCloseVent(meshdata *ventmesh, int ivent){
   if(close_vent->dir2==ZDIR&&close_vent->kmin>0&&close_vent->kmax<ventmesh->kbar)return close_vent;
   vdummy_start = ventmesh->ventinfo+ventmesh->nvents-ventmesh->ndummyvents;
   for(i = 0;i<ventmesh->ndummyvents;i++){
-    ventdata *vi;
-    
+
     vi = vdummy_start+i;
     if(close_vent->imin==vi->imin&&close_vent->imax==vi->imax&&
        close_vent->jmin==vi->jmin&&close_vent->jmax==vi->jmax&&

@gforney
Copy link
Contributor

gforney commented Apr 3, 2017 via email

@JakeOShannessy
Copy link
Contributor Author

All fixed, thanks Glenn.

@gforney
Copy link
Contributor

gforney commented Apr 3, 2017

by the way, I made some big changes in how I read in .smv files . I'm now reading the .smv file into a memory buffer before parsing. The intent is to speed processing for large cases (.smv file many lines). These changes have passed smokebot and firebot but let me know if you come across weird behavior .

@gforney gforney closed this as completed Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants