CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Post-Processing

Probes/Sensors in runtime

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree2Likes
  • 2 Post By niklas

Reply
 
LinkBack Thread Tools Display Modes
Old   April 10, 2013, 04:04
Default Probes/Sensors in runtime
  #1
New Member
 
gabi
Join Date: Mar 2013
Posts: 4
Rep Power: 3
gabitinho is on a distinguished road
Hi all,
My problema is concerned about the sampling of data during the runtime.
I'll try to explain myself pretty clear.

I can create a sampleDict for my puntual sensors; for example:
Code:
sets
(
   GaugesP
   {
        type patchCloud;
        axis xyz;
        patches 1(wall5);
        points ((1 10 15));
        maxDistance 100;
   }
)
Or i can add in my controlDict some lines to do the same but in the runtime; for example:
Code:
probes
{
   tyoe  probes;
   functionObjectLibs ("libsampling.so");
   enabled true;
   outputControl timeStep;
   outputInterval 1;
}

fields
(
   U
);

probeLocations
(
   (1 10 15)
);
And here is my problem; I can create a sampleDict for my line sensors; for example:

Code:
sets
(
   GaugesL
   {
       type uniform;
       axis xyz;
       start (0.5 0.001 0);
       end (0.5 0.001 1); 
       nPoints 101;
   }
);
but I DO NOT KNOW how to do the same thing in the runtime; i have tried many expressions in the controlDict but i was not able to do it.

Can anyone help me?

Thanks a lot for your time,
g.

Last edited by gabitinho; April 10, 2013 at 10:14.
gabitinho is offline   Reply With Quote

Old   April 10, 2013, 09:52
Default
  #2
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 692
Rep Power: 18
niklas will become famous soon enough
Do you mean something like this?
just add this to your controlDict

Code:
functions
{

    probes
    {
	functionObjectLibs ( "libutilityFunctionObjects.so" );
        type probes;
	probeLocations
	(
	   ( 0 0 0.4265111 )
	   ( 0 0 0.5284111 )
	   ( 0 0 0.7316111 )
	);
	fields ( p T );
    }
}
niklas is offline   Reply With Quote

Old   April 10, 2013, 10:20
Default
  #3
New Member
 
gabi
Join Date: Mar 2013
Posts: 4
Rep Power: 3
gabitinho is on a distinguished road
Hi Niklas,
Thanks for your response;

I understand that the code that you wrote it is used for "point gauges" (x,y,z coordinates are needed)...

... BUT I need a code to be placed in the controlDict for "line gauges": starts from one point (Xi,Yi,Zi) and ends in another point (Xe,Ye,Ze), like free-surface gauges that are used in laboratory along a line.

g.
gabitinho is offline   Reply With Quote

Old   April 10, 2013, 17:45
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,772
Rep Power: 37
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gabitinho View Post
Hi Niklas,
Thanks for your response;

I understand that the code that you wrote it is used for "point gauges" (x,y,z coordinates are needed)...

... BUT I need a code to be placed in the controlDict for "line gauges": starts from one point (Xi,Yi,Zi) and ends in another point (Xe,Ye,Ze), like free-surface gauges that are used in laboratory along a line.

g.
What is wrong with the "sets"-functionObject?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 11, 2013, 02:58
Default
  #5
New Member
 
gabi
Join Date: Mar 2013
Posts: 4
Rep Power: 3
gabitinho is on a distinguished road
Quote:
What is wrong with the "sets"-functionObject?
There is nothing wrong with it, but I must do it once the simulation has finished.
That's why I am trying to add some lines to my controlDict so I can obtain the info from my sensors in the run-time.

g.
gabitinho is offline   Reply With Quote

Old   April 11, 2013, 04:14
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,772
Rep Power: 37
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gabitinho View Post
There is nothing wrong with it, but I must do it once the simulation has finished.
That's why I am trying to add some lines to my controlDict so I can obtain the info from my sensors in the run-time.

g.
I said FUNCTIONOBJECT. That is executed at runtime
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 11, 2013, 06:31
Default
  #7
New Member
 
gabi
Join Date: Mar 2013
Posts: 4
Rep Power: 3
gabitinho is on a distinguished road
Hi gschaider,
I think that I am not explaining my self clearly enough, sorry for that...

Quote:
I said FUNCTIONOBJECT. That is executed at runtime
Yes, that is the point;
I want to do it as a FUNCTIONOBJECT (that is executed at runtime), but I do not know to write the proper lines.

so, how do I define the start-point and the end-point of the line-segment?

I can NOT use
Code:
start (0.5 0.001 0);        
end (0.5 0.001 1);
g.
gabitinho is offline   Reply With Quote

Old   April 11, 2013, 07:20
Default
  #8
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 692
Rep Power: 18
niklas will become famous soon enough
Code:
    line
    {
        type            sets;
        functionObjectLibs ("libsampling.so");
        enabled         true;
        outputControl   timeStep;
        outputInterval  1;

	interpolationScheme cellPoint;
	setFormat       raw;
	sets
	(
	    line1
            {

	      type uniform;
	      axis distance;
	      start ( 0 0 0 );
	      end   ( 1 0 0 );
	      nPoints 10;
	    }
	);
        fields
        (
            p
        );
    }
niklas is offline   Reply With Quote

Old   April 11, 2013, 07:27
Default
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,772
Rep Power: 37
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by gabitinho View Post
Hi gschaider,
I think that I am not explaining my self clearly enough, sorry for that...

Yes, that is the point;
I want to do it as a FUNCTIONOBJECT (that is executed at runtime), but I do not know to write the proper lines.

so, how do I define the start-point and the end-point of the line-segment?

I can NOT use
Code:
start (0.5 0.001 0);        
end (0.5 0.001 1);
g.
Well. You can. Niklas showed you in the other post. That function-object uses exactly the same back-end as the samples/set-utility so I'd have thought your problem is only that you didn't know THAT the functionObject exists. Was wrong
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mapping values from 2D mesh to 3D mesh boundary during runtime benk OpenFOAM Programming & Development 1 June 13, 2014 02:39
runTime out of scope in functionObject Sune OpenFOAM Programming & Development 2 September 26, 2012 02:11
Access UMean at runtime deji OpenFOAM 2 March 19, 2012 13:10
runTime deji OpenFOAM 1 October 16, 2010 13:06
FORTRAN runtime error, Please help Harendra CD-adapco 3 August 23, 2005 03:49


All times are GMT -4. The time now is 00:27.