You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am very happy about this repository and would like to contribute to it myself. But i would like to check in advance if there is a correct approach for this and if there is any interest at all.
I am currently simulating an LES case using rhoPimpleFoam. Especially the initial transient phase of this simulation needs to be monitored. Therefore, I am using probes along the domain. Because the simulation must remain performant, I may wish to change something in the simulation settings. Also, I don't necessarily know how the probes were placed by myself.
readpostpro.readprobes returns only the data in the postProcessing file. I would like to have the information in the header as well.
I am currently fiddling around with fluidfoam v0.2.3. The header is parsed in lines 154-155. I would focus on developing a new function in the following section of code
with open(os.path.join(path_probes_name, time_name, name), "rb") as f:
content = f.readlines()
j = 0
header = True
for dummy, line in enumerate(content):
if "#".encode() in line:
j += 1
elif "#".encode() not in line and header:
header = False
line = line.replace(b")", b"")
line = line.split(b"(")
try:
dim = len(line[1].split())
except IndexError:
dim = 1
line = line[0].split()
time_vect = np.zeros(len(content) - j)
time_vect[0] = line[0]
tab = np.zeros([len(content) - j, len(line) - 1, dim], dtype=float)
The new return of the function should be an array of vectors of the positions. I am not super familiar with OpenFOAM. If necessary, it can also be read out if a probe was in the domain or if only dummy data was written out.
A header of my probes, generated with OpenFOAM v2106:
I invite you to test my implementation by getting my fork : https://github.com/CyrilleBonamy/fluidfoam.
And tell me if it meets your needs. If yes i will merge my modifications here.
Usage example : probes_loc, time_vect, dummy = fluidfoam.readprobes(case, time_name="mergeTime")
I am very happy about this repository and would like to contribute to it myself. But i would like to check in advance if there is a correct approach for this and if there is any interest at all.
I am currently simulating an LES case using rhoPimpleFoam. Especially the initial transient phase of this simulation needs to be monitored. Therefore, I am using probes along the domain. Because the simulation must remain performant, I may wish to change something in the simulation settings. Also, I don't necessarily know how the probes were placed by myself.
readpostpro.readprobes returns only the data in the postProcessing file. I would like to have the information in the header as well.
I am currently fiddling around with fluidfoam v0.2.3. The header is parsed in lines 154-155. I would focus on developing a new function in the following section of code
readpostpro.py
The new return of the function should be an array of vectors of the positions. I am not super familiar with OpenFOAM. If necessary, it can also be read out if a probe was in the domain or if only dummy data was written out.
A header of my probes, generated with OpenFOAM v2106:
Any thoughts on this are highly appreciated.
The text was updated successfully, but these errors were encountered: