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

Radiation to open boundaries #6109

Closed
herbertTau opened this issue Mar 2, 2018 · 28 comments
Closed

Radiation to open boundaries #6109

herbertTau opened this issue Mar 2, 2018 · 28 comments
Assignees

Comments

@herbertTau
Copy link

Referring to the issue #4156 I thought about the problem of the too high air velocity, even though the temperature in the domain and at the open vent (defined with TMP_EXTERIOR) are the same. There is only a difference between TMP_EXTERIOR and TMPA.

In the attached test case I set the temperature in the domain and also at the open vent to 0°C. The solids are also set to 0°C (TMP_FRONT=0). Only TMPA has 20°C by default. In the image you can see that the radiative heat flux has a maximum value of about 75 W/m². This seems to me that the walls see the temperature of TMPA and not the temperature of TMP_EXTERIOR.

exterior.fds.txt

radiative-heat-flux

@mcgratta mcgratta self-assigned this Mar 2, 2018
mcgratta added a commit that referenced this issue Mar 2, 2018
FDS Source: Issue #6109. Use TMP_EXTERIOR in radiation calc.
@mcgratta
Copy link
Contributor

mcgratta commented Mar 2, 2018

The radiation calculation was ignoring TMP_EXTERIOR. If you can recompile, do so and let me know if it works now.

@herbertTau
Copy link
Author

Thanks, it works now.
Concerning TMP_EXTERIOR or rather TMP_EXTERIOR_RAMP I noticed some inconsistency. Shall I open a new issue for it ?

@rmcdermo
Copy link
Contributor

rmcdermo commented Mar 5, 2018

No, just append to #6109 Thanks

Oops... guess this that issue.

@herbertTau
Copy link
Author

In the test case I change the exterior temperature, starting at 6 sec until 7 sec from 0°C to 20°C. Only one boundary is open the other boundaries are walls. In the case when XMIN is open (see attached file) there is no change in temperature throughout. In all other cases you can recognize the changing of temperature.

exterior2.fds.txt

Fig. 1: Temperature after 7 sec. at open vent XMIN
xmin

Fig. 2: Temperatur after 7 sec. at open vent XMAX
xmax

mcgratta added a commit to mcgratta/fds that referenced this issue Mar 6, 2018
mcgratta added a commit that referenced this issue Mar 6, 2018
FDS Source: Issue #6109. Add ramping for TMP_EXTERIOR
@mcgratta
Copy link
Contributor

mcgratta commented Mar 6, 2018

I forgot to add RAMP functionality for TMP_EXTERIOR. Try it now.

@herbertTau
Copy link
Author

Sorry, but the result is always unchanged. The problem only occurs at the open vent XMIN as mentioned above.

@mcgratta
Copy link
Contributor

mcgratta commented Mar 7, 2018

Set STRATIFICATION=.FALSE. on the MISC line. TMP_EXTERIOR was not designed to work with a stratified atmosphere. In your case, the slight decrease in density and pressure with height causes this slight change in temperature.

@herbertTau
Copy link
Author

Setting STRATIFICATION=.FALSE. makes little difference. But the slight decrease in density and pressure with height is at this moment not the subject but the RAMP functionality for TMP_EXTERIOR. The open vent at XMIN behaves not in that way as it does when XMAX is the open vent. Therefore I would expect the same result as seen in Fig. 2 but mirrored. With the new compiled version the problem has not been solved yet.

mcgratta added a commit that referenced this issue Mar 7, 2018
FDS Source: Issue #6109. Fix time ramp of TMP_EXTERIOR.
@mcgratta
Copy link
Contributor

mcgratta commented Mar 7, 2018

OK, I think I got it this time. It was a simple error. I don't think anyone has every used the ramp of TMP_EXTERIOR.

@herbertTau
Copy link
Author

Thank you, now it works.
I will not trouble you for longer with TMP_EXTERIOR but I would also like to add one point.

Case1:
When there is for instance a closed room and the temperature in the room is different to TMPA then you get a pressure profile in the closed room, otherwise no pressure profile results if (T,room - TMPA = 0). Well, that's fine.

Case2:
In this case XMIN and XMAX are open vents and will be closed by two obstructions. The temperature in the room is set to 0°C and TMP_EXTERIOR at the open vents is set to 0°C as well. TMPA has 20°C by default. Now I would expect that no pressure profile results, because (T,room - TMP_EXTERIOR = 0). A run still shows that this is not the case. By doing several various runs I come to the conclusion that the pressure profile doesn't consider the temperature of TMP_EXTERIOR but only the temperature of TMPA.

Case3:
This case is same as case 2, but there are small openings in the obstructions for creating a connection to exterior. One opening is near the bottom at XMIN and one at the top at XMAX. Fig. 3 shows the velocity of the flow caused by the pressure profile. Fig. 4 shows the pressure profile. However, the temperature T,inside and TMP_EXTERIOR have the same value of 0°C. Case 3 demonstrates the effect I described in case 2.

Fig. 3
velocity

Fig. 4
pressure

exterior3.fds.txt

@rmcdermo
Copy link
Contributor

rmcdermo commented Mar 8, 2018

@herbertTau The PRESSURE you are looking at is a gauge pressure computed like this (in dump.f90):

   CASE( 9)  ! PRESSURE
      GAS_PHASE_OUTPUT_RES  = PBAR(KK,PRESSURE_ZONE(II,JJ,KK)) + RHO(II,JJ,KK)*(H(II,JJ,KK)-KRES(II,JJ,KK)) - P_0(KK)

The first term is the local zone pressure, second term in the hydrodynamic pressure, and the last is the ambient pressure, which is compute in init.f90 like this:

! Populate the cell-centered background temperature and pressure

   DO K=0,M%KBP1
      M%TMP_0(K) = TMPA*EVALUATE_RAMP(M%ZC(K),DUMMY,I_RAMP_TMP0_Z)
      M%P_0(K)   = EVALUATE_RAMP(M%ZC(K),DUMMY,I_RAMP_P0_Z)
   ENDDO

Then at a boundary the temperature of a cell face is set to TMP_EXTERIOR like this (in wall.f90):

IF (WC%VENT_INDEX>0) THEN
   VT => VENTS(WC%VENT_INDEX)
   IF (VT%TMP_EXTERIOR>0._EB) THEN
      TSI = T - T_BEGIN
      ONE_D%TMP_F = TMP_0(KK) + EVALUATE_RAMP(TSI,DUMMY,VT%TMP_EXTERIOR_RAMP_INDEX)*(VT%TMP_EXTERIOR-TMP_0(KK))
   ENDIF
ENDIF

The point is that TMP_EXTERIOR and TMP_0 are not the same thing, at least as we have things currently coded.

Note that if you are trying to use TMP_EXTERIOR as a substitute for a LAPSE_RATE for atmospheric flows, I think it would be better to adjust the lapse rate. Note there is a ramp RAMP_TMP0_Z on the WIND line in the latest source, if you need to fine tune your lapse rate.

Please see if these adjustments to TMP_0 solve your problem. Thanks.

@mcgratta
Copy link
Contributor

mcgratta commented Mar 8, 2018

Agreed. TMP_EXTERIOR was originally intended as a cheap way of specifying an exterior temperature of a house or small building. We did not integrate its functionality into the atmospheric stratification. If you want to consider stack effect, for example, it is best to model the entire building and a few meters of the exterior, and add an atmospheric profile.

@herbertTau
Copy link
Author

I think I did not express myself well. I try it again by giving another example.

The room of the case above has only a height of 2 meters. Let's assume that the temperature at the open vents will be defined by TMPA=20°C. TMP_EXTERIOR will not be considered here. The temperature in the domain will be set to 0°C by INIT. What happens ? The density of the air in the domain is higher as the density of the ambient air. Therefore the colder air in the domain begins to escape until there is a balance of temperature between inside and outside and the difference of pressure between bottom and top of the domain goes to zero (see diagram). In this case and the cases above the effect of the pressure gradient is the result of buoyancy and not of the atmospheric stratification.

Applied to the cases 1-3 I would like to express that the buoyancy (the difference in air density between inside and outside temperature) causes the air to flow. Although in case 3 TMP_EXTERIOR is set to 0°C and the temperature in the domain is set to 0°C you get this result as seen in Fig. 3 and 4. Sorry, but I can't explain more clearly ;) and hope you can understand my intention. Perhaps I use some technical terms incorrectly?

pressure2

exterior4.fds.txt

@rmcdermo
Copy link
Contributor

rmcdermo commented Mar 8, 2018

What we are saying is: please do not expect the TMPA assigned to an OPEN VENT to be a good way to set this. Put some domain outside the building with a hole in the OBST for the "vent".

@herbertTau
Copy link
Author

Thank you for your help. This can help me to learn and I get more understanding for the features of FDS. Should I now close this issue ?

@rmcdermo
Copy link
Contributor

rmcdermo commented Mar 9, 2018

Have you been able to set up the case with the external atmospheric profile and all works as expected? Than, yes, please close the issue. Thanks.

@herbertTau
Copy link
Author

I have looked at other issues with this special problem and I see now that I have to use this option cautiously.
Nevertheless I tried out by setting up the case with RAMP_TMP0_Z on the wind line. There I get following error:

Mesh 1 is assigned to MPI Process 0
OpenMP thread 0 of 3 assigned to MPI process 0 of 0
OpenMP thread 2 of 3 assigned to MPI process 0 of 0
OpenMP thread 1 of 3 assigned to MPI process 0 of 0
OpenMP thread 3 of 3 assigned to MPI process 0 of 0
Completed Initialization Step 1
Completed Initialization Step 2
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
fds 00000000059AAB24 Unknown Unknown Unknown
libpthread-2.23.s 00002AF5C02B4390 Unknown Unknown Unknown
fds 00000000061E65C9 Unknown Unknown Unknown
fds 0000000005A8959D MAIN__ 168 main.f90
fds 000000000040784E Unknown Unknown Unknown
libc-2.23.so 00002AF5C1CC6830 __libc_start_main Unknown Unknown
fds 0000000000407729 Unknown Unknown Unknown

When I do the run with the compiled version from March 08, 2018 I get following error:

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0 0x2ba0e9cc6fba in ???
#1 0x2ba0e9cc61e3 in ???
#2 0x2ba0eb0124af in ???
#3 0x80b85b in ???
#4 0x82f482 in ???
#5 0x4820dc in ???
#6 0x2ba0eaffd82f in ???
#7 0x482108 in ???
#8 0xffffffffffffffff in ???

exterior5.fds.txt

@sbenkorichi
Copy link
Collaborator

Yeah, I can see it,

At line 325 of file ../../Source/init.f90
Fortran runtime error: Index '0' of dimension 1 of array 'ramps' below lower bound of 1

Error termination. Backtrace:
#0  0x14d27f676fba in ???
#1  0x14d27f677ba5 in ???
#2  0x14d27f677f77 in ???
#3  0x1496744 in __init_MOD_initialize_mesh_variables_1
	at ../../Source/init.f90:325
#4  0x14b2ebc in fds
	at ../../Source/main.f90:161
#5  0x1539a9a in main
	at ../../Source/main.f90:5

Set STRATIFICATION=.FALSE. on the &WIND line.

@herbertTau
Copy link
Author

The error doesn't appear any more, but I do not notice any change in temperature with height.

@sbenkorichi
Copy link
Collaborator

You need to wait for Kevin or Randy until they get back in.

@mcgratta
Copy link
Contributor

I'll have a look.

mcgratta added a commit that referenced this issue Mar 12, 2018
FDS Source: Issue #6109. Fix RAMP_TMP0_Z functionality.
@mcgratta
Copy link
Contributor

Should be fixed. Some of these input parameters were designed to work with M-O parameters, and I did not ensure that they work independently. If this works, close the issue and start a new one if new issues arise.

@herbertTau
Copy link
Author

It didn't change. If you don't set STRATIFICATION to FALSE you still get the segmentation fault. Should it not automatically set to default if RAMP_TMP0_Z is in use ?

@sbenkorichi
Copy link
Collaborator

Update your repo, or download the source code again, Kevin has already made a fix.
It's working on my end.

@herbertTau
Copy link
Author

Sorry, but there is no difference. Is the input file correct?
exterior6.fds.txt

@sbenkorichi
Copy link
Collaborator

Look into your previous input file, it's not the same as this one.

What I recommend you do is the following:
Remove stratification=F , also remove the speed as it wasn't in previous case. If by doing so, gives you an error, open up a new issue with the input file uploaded, make sure to run it on the latest source code by downloading it from here (https://github.com/firemodels/fds)

If it does give you an error only by setting stratification and adding speed, then also open up new issue.

Close this issue as Kevin suggested and open new one, as it's getting too long and would be hard to keep reading all the comments.

@herbertTau
Copy link
Author

I do not understand it. I opened a new folder and copied the existing file to this folder and now it works.

@sbenkorichi
Copy link
Collaborator

sbenkorichi commented Mar 13, 2018

Ok, good.
Thanks for reporting back,
it does happen, I've made/seen loads of stuff and I still making them.

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

4 participants