|
[Sponsors] |
programming new format writer for surface sampling |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 2, 2015, 16:49 |
programming new format writer for surface sampling
|
#1 |
New Member
Kossivi GOKPI
Join Date: Jun 2010
Location: France
Posts: 28
Rep Power: 16 |
Hi Foamers,
I'm trying to programm a new format writer for surface sampling. I explain my self: To output the pressure and the face centers for example on a surface, one uses sampleDict and putting the surfaceFormat as raw or vtk.... So wanting to write a new format and output vaues as pressure, normal of the faces, en cellcenters...in a format which will be read in a homemade sofware. So a saw the the writers are in : src/sampling/sampledsurface/.../writers. So should a make a copy in my USER_DIR and modify one of the write format accordingly and how can I tell the SampleDict to tanke into account my new format writer; and to read the writeType. If someone can help me I will very appreciate. Thank very much. Kossivi |
|
April 4, 2015, 16:40 |
sampling surface format programming
|
#2 |
New Member
Kossivi GOKPI
Join Date: Jun 2010
Location: France
Posts: 28
Rep Power: 16 |
[QUOTE=Kossivi;539728]Hi Foamers,
I'm trying to programm a new format writer for surface sampling. I explain my self: To output the pressure and the face centers for example on a surface, one uses sampleDict and putting the surfaceFormat as raw or vtk.... So wanting to write a new format such as nastran format writer, I saw the the writers are in : src/sampling/sampledsurface/writers. So should a make a copy in my USER_DIR and modify one of the write format accordingly and how can I tell the SampleDict to tanke into account my new format writer; and to read the writeType. If someone can help me I will very appreciate. Thank very much. Kossivi |
|
April 14, 2015, 04:17 |
|
#3 |
New Member
Damiano Natali
Join Date: Mar 2013
Location: Genova, Italy
Posts: 17
Rep Power: 13 |
Hi Kossivi,
you have to perform two different actions. First thing is: 1) make a copy of the whole $FOAM_SRC/sampling folder into your own user space 2) take a look to $FOAM_SRC/sampling/Make. There you have "files" and "options" 3) you are mainly interested in $FOAM_SRC/sampling/Make/files. Here you find the list of files you want to be compiled into (see last line) the sampling library. 4) what you want is to compile your own library, let's say "libmySampling" to be added to your user library folder, $FOAM_USER_LIBBIN, so edit the last line to be LIB = $(FOAM_USER_LIBBIN)/libmySampling Second modification to be done regards the sampling utility ($FOAM_APP/applications/utilities/postProcessing/sampling/sample) 1) copy the folder to your user space 2) here you find the Make folder, which contains the same files. 3) Here "files" is lot easier than the previous in that you compile just one application, and you may want to customize it, let say mySample.C // remember to edit the filename accordingly EXE = $(FOAM_USER_APPBIN)/mySample 4) in the "options" file you have at line 14 the -lsampling which tell the application to use the standard sampling library. What you have to do is to replace it with your edited library -L$(FOAM_USER_LIBBIN) \ -lmySampling \ where the "-L" flag informs the compiler on where to find your customized library. Hope this helps, Damiano
__________________
Damiano Natali Eng Phd | R&D and FEA Engineer ________________________________________ Cressall | Optimum Resistor Solutions Evington Valley Road, Leicester, Leicestershire, LE5 5LZ, UK. NERs | Load Banks | Marine & Offshore | DBRs | Renewables |
|
April 14, 2015, 18:14 |
|
#4 | |
New Member
Kossivi GOKPI
Join Date: Jun 2010
Location: France
Posts: 28
Rep Power: 16 |
Quote:
Thanks for your help I have done as you indicated, and every compile very well. I compile first the my sampling and the utility in the application. So to see if it works, I write something in the raw writer to output but it doesn't work. It seems that mine is not taken into account. Here are the folders as modified according to your advice, if you can have a look Thanks Kossivi |
||
April 16, 2015, 02:11 |
|
#5 |
New Member
Kossivi GOKPI
Join Date: Jun 2010
Location: France
Posts: 28
Rep Power: 16 |
Any help to this post ?
Thanks Kossivi |
|
April 18, 2015, 17:28 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
If you can provide a test case and the code you're testing, it would make it a lot easier for anyone to help you.
Otherwise, it will take a considerable amount of time to try and replicate the same structure you're using, which makes it less likely anyone will have enough free time to assist you in this. |
|
April 21, 2015, 19:28 |
|
#7 | |
New Member
Kossivi GOKPI
Join Date: Jun 2010
Location: France
Posts: 28
Rep Power: 16 |
Quote:
Hi wyldckat, Sorry for my late replying. My src/sampling folder even compressed is to heavy to load on the site. May be there is a way to not exceed 97.0 KB ? The same for my case file. And thanks for your help Best, Kossivi |
||
October 24, 2015, 17:47 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Kossivi,
Sorry for the really late reply. I had this post of yours on my to-do list and only today did I finally manage to take a quick look into this The problem was that in the file "sample/Make/options" you were still using the original source code path for the sampling library: Code:
-I$(LIB_SRC)/sampling/lnInclude As for making it more compact, you should have run this command: Code:
wclean all Best regards, Bruno |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sampling interval and sampling frequency | beauty | FLUENT | 13 | November 9, 2022 09:23 |
[Discretizer] Installing Discretizer | umassche | OpenFOAM Community Contributions | 26 | January 25, 2017 06:33 |
Best format for simulation data? | cbisw | Main CFD Forum | 9 | May 30, 2011 03:38 |