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

Averaging FDS SLCF data #76

Open
AlanZandie opened this issue Apr 5, 2024 · 1 comment
Open

Averaging FDS SLCF data #76

AlanZandie opened this issue Apr 5, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@AlanZandie
Copy link

Good day,

I need to get the average velocity contour at a particular height across a car park from 200s to 300s, meaning I need to output averaged values rather than instantaneous data. Normally you can do that with DEVC using the STATISTICS_START/STATISTICS_END option in FDS then output it using fdsreader, but it does not work on SLCF which makes sense because they are an array of floating points. Could you please help me if you know a way to do so?
P.S: I need the SLCF to be averaged because I need the cell-centred values, so I cannot go for other options like using DEVC.
I have attached a screenshot of the code I'm using, could you please help me if you've got an idea?
Screenshot (3227)

thank you

@JanVogelsang JanVogelsang self-assigned this Apr 5, 2024
@JanVogelsang JanVogelsang added the question Further information is requested label Apr 5, 2024
@JanVogelsang
Copy link
Collaborator

Hi Alan, I'm afraid I don't understand your problem. gsliuce_u (etc.) are arrays of values, so you can just average those values: np.mean(gsclice_u[200:300]).
Of course you would want to replace "200" and "300" with values that make sense in your case. For example:

start = slc_u.get_nearest_timestep(time=200)
end = slc_u.get_nearest_timestep(time=300)
average = np.mean(gslice_u[start:end])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants