|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Dan
Join Date: Oct 2010
Location: UK
Posts: 41
Rep Power: 16 ![]() |
Hi All
I have been trying to define a new velocity patch field type, based on timeVaryingInletOutlet under openFoam 1.7.0 for use with pimpleDyMFoam I copied and pasted the files, replaced all instances of "timeVaryingInletOutlet" with "myTimeVaryingInletOutlet" Then altered the code slightly so that instead of taking the refValue from a time data series, it takes it from a ".dat" file. The code compiled and my new patch field appeared in the list headed Valid patchField types are : However when I attempted to run it I got the following error, Code:
Reading field U pimpleDyMFoam: symbol lookup error: /home/droper1/OpenFOAM/droper1-1.7.0/lib/linux64GccDPOpt/libmytvfriv.so: undefined symbol: _ZN4Foam43myTimeVaryingUniformInletOutletFvPatchFieldINS_6VectorIdEEEC1ERKNS_7fvPatchERKNS_16DimensionedFieldIS2_NS_7volMeshEEERKNS_10dictionaryE Can anybody help shed some light on what I'm doing wrong? Any help would be greatly appreciated. Daniel |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Dan
Join Date: Oct 2010
Location: UK
Posts: 41
Rep Power: 16 ![]() |
Its Ok... I fixed it.. still not sure how?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 29 ![]() |
I may be doing something similar in the future, so it would be interesting as to how you fixed it. Between getting this problem and having it work, what steps did you take. List as many as you can remember, it could be something as simple as the command you typed to compile being slightly different
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Dan
Join Date: Oct 2010
Location: UK
Posts: 41
Rep Power: 16 ![]() |
After my first failed attempt I started from scratch, but I will go through my successful attempt
Ok Here goes. The first thing I did was copy and paste the whole source file into my openFoam user directory, I then created the make folder, ensuring that the library that the original was located in was included in the options file. And in this case the files folder listed only the file ending in ..."s.C". I then renamed each file and used search and replace function in my text editor to change all instances of "timeVaryingUniformInputOutput" to "myTimeVaryingUniformInputOutput" Then it was a case of deleting the time series variable from the header file, and replacing it with a fileNameVariable, and in my case a scalar. In the .C source file I then included "IFstream.H" and instigated my two new variables in each of the constructors, following the pattern of the time series variables, i.e replacing timeSeries_() with DataFile_("0.dat"); and timeSeries_(ptf.timeSeries_) with DataFile_(ptf.DataFile_) etc.. in updateCoeffs() it took me some time to realize that refValue() is a vector field not a vector so I copied and pasted the dictionary constructor from the InputOutput parch class, and changed it so that the dictionary comes from the IFstream, I used the scalar from earlier to store the size of the vector field needed. Finally I altered the write function to write the data file name instead of the time series. it was then just a case of getting my runtime function to output a file with the desired velocity at each time iteration, then link my boundary patch to outputted file. It seems to work as long as I create an the velocity file before starting. There is probably a much more elegant way of doing all this. I hope this helps.. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Fluent msh and cyclic boundary | cfdengineering | OpenFOAM Meshing & Mesh Conversion | 49 | November 29, 2024 21:16 |
[CGNS] CGNS converters available | mbeaudoin | OpenFOAM Meshing & Mesh Conversion | 137 | December 14, 2018 04:20 |
Pressure instability with rhoSimpleFoam | daniel_mills | OpenFOAM Running, Solving & CFD | 44 | February 17, 2011 17:08 |
buoyantSimpleRadiationFoam | msarkar | OpenFOAM | 0 | February 15, 2010 06:22 |
Problems with Turbulence Modeling | ezsoal | OpenFOAM Running, Solving & CFD | 4 | November 26, 2009 15:12 |