CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to sum up scalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 14, 2008, 07:50
Default Hi, I'm trying to write a new
  #1
New Member
 
Christian Wesemeyer
Join Date: Mar 2009
Posts: 19
Rep Power: 17
wese is on a distinguished road
Hi,
I'm trying to write a new boundary condition where I can use the result of the algebraic solution for the velocity profile of a fluid in a square duct.

The analytical solution includes two summation loops, which I've tried to implement by two for-loops.

My problem is, that in every looping-step I need to calculate the sinus of a product between the magnitue of a VectorField and a scalar and sum this up.

As far as I've understood it the mag(VectorField) gives me a ScalarField as output, but when I try to sum up the so calculated scalarFields my calculation always aborts.

I've already tried to eliminate all other possible reasons for the abortion and if I don't try to sum up the calculated ScalarFields everything works fine.

Is there any kind to "sum-function" included in openfoam or how can I solve this problem?

I've already searched the forum and the Doxygen, but the later looks very cryptic for me (I think, because I'm quite new to openFoam and C++).

Thanks in advance

Christian
wese is offline   Reply With Quote

Old   August 19, 2019, 17:11
Default
  #2
Senior Member
 
Alejandro
Join Date: Jan 2014
Location: Argentina
Posts: 128
Rep Power: 12
ancolli is on a distinguished road
I am facing a similar problem. Any suggestions?
ancolli is offline   Reply With Quote

Old   August 19, 2019, 17:30
Default
  #3
Senior Member
 
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 250
Rep Power: 16
peterhess is on a distinguished road
Hello,
Well, may be I am not able to give you a direct answer, but at least I could give you plan B to overcome the chalange...

After finishing the simulation, you could open the case using paraView, isolate the data you want to manipulate, export the data to openOffice and there you could manipulate the data the way you want...

To do that make the following steps:

- Open the case using paraFoam

- Mark the boundary (or region) you want the data to be taken from

- At the left side of the GUI of paraFoam click splite horizontal

- In the new opened window choose SpreadSheet View

- From attribute choose the poit or cell data as needed

- You will see a list with all loaded variables

- At the right side choose export SpreadSheet

- Give the file a name

- Open the file using excel

- Manipulate as you want and have fun

Regards

Peter

Last edited by peterhess; August 20, 2019 at 15:59.
peterhess 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
How to set up an AUTO_WRITE scalarField xiao OpenFOAM Running, Solving & CFD 9 July 22, 2010 03:23
max for scalarField maka OpenFOAM Bugs 9 February 19, 2009 09:43
ScalarField division maka OpenFOAM Pre-Processing 2 August 27, 2007 05:10
[CGNS] Computing a cellcentered scalarField from a vertexcentered scalarField mbeaudoin OpenFOAM Meshing & Mesh Conversion 10 February 22, 2007 07:43
Replacing components in a scalarField grtabor OpenFOAM Running, Solving & CFD 1 February 5, 2007 12:24


All times are GMT -4. The time now is 13:50.