Hi,
I would like to conver
Hi,
I would like to convert existing data (e.g. u-velocity form a vtk file) to the 'native' openfoam format using a small script (python). It is a structured orthogonal hexa mesh, so it should be pretty easy... Unfortunately, I could not find anything about the format of openfoam's U file. Would be nice, if anybody has an idea! Greetings! Fabian |
The U-file is just another fie
The U-file is just another field-file. It is described in Section 4.2.7 of the UserGuide (there is even a small example of a U-file there).
Writing the U-file should be the easy once you have generated the mesh-information. THAT should be the interesting part (Chapter 6) |
Hi Bernhard,
I saw the docu
Hi Bernhard,
I saw the docu, but I did not get smart out of it... to be clear, I do not know in what kind of loop I have to write the internal field. Does it look like a loop for z 1 to 100 for y 1 to 100 for x 1 to 100 write u(x,y,z) to internal field end end end or is it totally different!? It should be important, so openfoam does not get confused... I imported the mesh from Fluent, so it should be no problem for me anymore. Greetings! Fabian |
Well, the problem is, that the
Well, the problem is, that the order of the values in the internalField depends on the "order" of the cells in the geometry. Because OpenFOAM doesn't depend on a block-structured mesh to work there is no "natural" order for blocks like other solvers have it. It all depends on who contructed the mesh (and how). So there are two routes:
a) you use blockMesh to build your mesh. Reverse engineer the output (or the source) to determine in which order cells are constructed for one block. Then write the loops accordingly. I guess this is less work, but you've got to hope that the order doesn't change with future versions of blockMesh b) you let your script write the whole polyMesh (write the points - that should be trivial for your mesh, write the faces and the cells - that shouldfn't be too hard to). Then write the data in the field according to the Fabian-given order Sorry: I overread the Fluent-Remark (and I don't want to throw away what I previously typed). That makes things a bit more complicated. But if it's a straight block-mesh (as I assume from your pseudo-program): is Fluent necessary? (as you seem to have the data in a different format anyway) |
We currently have fluentMeshTo
We currently have fluentMeshToFoam and foamDataToFluent, but I'm pretty sure I also wrote fluentDataToFoam. This would take the Fluent data file and split it up into OpenFOAM fields. If this is what you need, I can have a look at the backup tapes etc. to dig it out.
Hrv |
Hi,
Bernhard:
I actuall
Hi,
Bernhard: I actually created the original mesh for fluent and a fortran code (multiblock format) with icem. I could use the fluent mesh for some simpleFoam calculations and now, I want to 'import' the velocity field of my fortran code. I can convert my velocity to tecplot, ensight and vtk format, but not yet to openfoam. You are probably right, that it would be easiest to write the whole polymesh with the script too... Thanks! Hrvoje: Thanks, but right now, I would not need it... but maybe later :-) Greetings! Fabian |
Hi Hrv.
If it isn't too muc
Hi Hrv.
If it isn't too much trouble and you can find it: could I have that fluentDataToFoam? Thanks |
Hello,
Were you able to find
Hello,
Were you able to find this fluentdatatofoam utility? I would really like to have it. Thanks. |
hi,
I am doing a simulation,i
hi,
I am doing a simulation,it is about the wind pressure on the building.there is a problem to set the velocity of the wind.it is ok when I set it the exactly value, such as 5m/s,but the velocity of the wind is change by the height,such as 0.2Z(Z is the height.),I don't know how to fix it,I am very appreciate if someone can help me. |
Hi!
I have a problem related
Hi!
I have a problem related to Hrv's posting about the fluentToFoam. I want to solve advection diffusion on a given velocity field/mesh (generated by fluent). scalarTransportFoam would do this for me, and with fluentMesh3DToFoam i can import the mesh, but what is missing is the import of the veolcity field. The "fluentDataToFoam" would probably solve this elegantly. Has anybody an idea where one can find the utility? thanks a lot hansjoerg |
Hi,
i have done this once b
Hi,
i have done this once by hand. Not very convenient but it worked at least for my case. 1) use fluent3DMeshToFoam for the grid 2) export the velocity field by writing a interpolation file from fluent 3) copy the appropriate data columns to 0/U This works as long as the cell order in fluent and openfoam is the same. i remember doing this for a 2D Case. should work for 3d as well... but no guarantee ;-) bst regards christian |
Hi christian!
Sounds interest
Hi christian!
Sounds interesting, thanks a lot. What uou mean with writing a interpolation file? do you remember the fluent commands? thanks hj |
hj,
I have also done this wit
hj,
I have also done this with a dirty little fortran program I wrote to take the Fluent .ip file and write it out to OF input formats for certain variables. While it seemed to work and the resulting fields were somewhat decent, it had a lot of "noise" (random cells with discontinuities). This may have been due to differences in cell numbering that may have occured at some point in the fluentMeshToFoam conversion...I'm not sure. If Hrv has a better fluentDataToFoam converter I would love to have it as well...*please*. As for creating a Fluent interpolation file, you go to "file interpolate write-data" and select your fields to write out and name the file as a ".ip". The format is relatively simple and is described in section 4.13.2 of the Fluent User Guide. |
One other note - the x,y,z cel
One other note - the x,y,z cell coordinates are also included in the .ip file and it may be possible to use these somehow in mapping the new fields in order to eliminate the issue of cell numbering.
-Kent |
Hi,
'visit' could be the tool
Hi,
'visit' could be the tool of choice, it has a lot of readers and might export into openfoam format in the near future; I hope :-) I am not sure, how easy it is to implement, but one of there developers gets an eye on it... this would be nice, to get some inlet conditions of experiments as well. Fabian |
Hello!
I'll try to write the
Hello!
I'll try to write the converter for fluentDataToFoam, if nobody already did. (Horve ?) Any ideas where to start from? - I'll use the foamDataToFluent as template for the code, but where can i get good documentation of the storage formats (especially fluent data structure) Thanks hj |
In visit there is a tool calle
In visit there is a tool called 'spreadsheet', which can be used to export every format into a raw text format. This is not suitable to extract all data to OpenFoam, but is certainly a way to extract bc-data from experiments and e.g. fluent for the use with 'timeVaryingMappedFixedValue' bc.
Fabian |
I'd like to know the present s
I'd like to know the present state of the fluentDataToFoam tool which Hrvoje thought having written some time ago.
Or if someone of the people above have heard something about that. Otherwise I'd have to write sth like that myself :P . The other way round, converting OF Data to Fluent, seems to loose the specified boundary conditions. Until now I didn't manage to find a solution in this forum nor in the other articles playing google. Someone must have had this problem before! If so, I'd be grateful for a post :-) Wassja Hrvoje Jasak on Monday, July 31, 2006 |
any progress on the fluendDataToFoam converter?
Hi,
I'm curious if there has been any progress on locating/writing the elusive fluentDataToFoam converter. I have a large amount of data I would like to get into OpenFOAM without having to re-run everything. Thanks in advance, -Mike |
FluentDataToFoam
Could somebody please let me know where I can find this fluentDataToFoam utility? I am using OF 1.6.
Thanks, Jason |
All times are GMT -4. The time now is 09:05. |