CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] what does this postProcessing SWAK code do?

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 11, 2013, 18:27
Default
  #21
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi
I thought it be good that show a graph obtained by working this function as attached.
then it would be a good explanation to this for readers:
"saves maximum values for each cell has located on the plane and returns maximum and minimum and averages of thes maximum values in each time step during run"
Attached Files
File Type: gz MaxU.pngcairo.tar.gz (36.4 KB, 6 views)
File Type: gz Maxp.pngcairo.tar.gz (33.3 KB, 0 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   August 3, 2015, 16:09
Default
  #22
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi everbody,

this thread is old but i have a question about swakexpressions, i want to know what "integrate " do in accumulations? while using a cellZone?

Is it a temperal or a spacial integral? and if it is a spacial integral is it a volume integral (dx,dy,dz) or is it a area integral (x,y)?

the thing is i want to obtain a velcity field and i want to get the velocity*dy to get a massflow/meter, so i try to understand if i can use the integral or if i need to use the average comand for accumulations??


thank alot to everybody

Rafa Marques
rafa13 is offline   Reply With Quote

Old   August 16, 2015, 15:55
Default
  #23
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. When in doubt, create a small test case for which you know what the results should give you and make the measurements in that. This way you can ensure that things are working as intended and you gain experience in doing so.
    • In my experience, when it comes to OpenFOAM, engineering, science and programming: assume nothing, test everything. Otherwise, your results are always doubtful.
  2. Integrate over a "cellZone" is most likely done over space, i.e. integrated in volume.
  3. Inside the swak4Foam source code folder is the file "Documentation/swak4FoamReference.md" which roughly answers your question.
wyldckat is offline   Reply With Quote

Old   August 18, 2015, 07:24
Default
  #24
Member
 
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12
rafa13 is on a distinguished road
Hi Bruno,

thanks a lot for your reply and i am in accordance with you, next time i do it first.

But i continue with the problem because when i create a faceZone to intergrate over a face to obtain the massFlow of the water it is not possible because I the alpha ia a cell information and not depends on the face fo the cell (this is what i think).

I try to explain what i did. I create a funkyexressionfield with alpha*Ux (ux is normal to the face) with a threshold of alpha>0.5, them i want to integrate this value over a face to obtain the water mass flow to get the overtopping of a wavebreaker.

At the moment i am only able to get the velocity profile of the water, creating various gauges on a vertical line to sample the velocity and then i wrote a code in matlab to integrate the velocity field in dy to get the massflow per meter in every timestep, but that is really expensive computationally and time consuming because of the many file that i get when sampling in timestep. so i try to use swak4foam to do it, but without success . may be you can give me a hind how to do it? I try it to do like the example in th wiki page of swak but it doesn work because of the alpha field.


thanks a lot

Rafa Marques

[ Moderator note: the continuation of this discussion moved to this thread: http://www.cfd-online.com/Forums/ope...swak4foam.html ]

Last edited by wyldckat; September 6, 2015 at 12:42. Reason: added moderator note
rafa13 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using fieldAverage library to average postprocessing eelcovv OpenFOAM Programming & Development 32 May 17, 2022 10:55
The FOAM Documentation Project - SHUT-DOWN holger_marschall OpenFOAM 242 March 7, 2013 13:30
Open Source Vs Commercial Software MechE OpenFOAM 28 May 16, 2011 12:02
Small 3-D code Zdravko Stojanovic Main CFD Forum 2 July 19, 2010 11:11
own Code vs. commercial code Bernhard Mueck Main CFD Forum 10 February 16, 2000 11:07


All times are GMT -4. The time now is 19:08.