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

Change the inlet condition at latest time!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2015, 07:36
Default Change the inlet condition at latest time!
  #1
rsa
New Member
 
Reza
Join Date: Jun 2012
Posts: 27
Rep Power: 14
rsa is on a distinguished road
Hi everyone,

I am running a gas jet penetrating into a liquid bath. I set the boundary condition on inlet as fixedValue (uniform (0 0.1 0))for velocity (at 0/U) and ran my case for 5s. Now I have changed my inlet velocity to 0.25. the problem is I want to monitor the inflow/outflow rate. I know at the end of the simulation I can use patchIntegrate to calculate the flow rate at inlet/outlet but I am wondering if I can do that during the run inside the controlDict and write them into a file so that I can check it and plot it! I am not sure if there is any simillar post respect to this, I couldnt find it but if anyone knows I appreciate to give me a link or maybe explain how to do it.

tanx
rsa is offline   Reply With Quote

Old   November 3, 2015, 05:21
Default
  #2
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

The faceSource functionObject can do the monitoring:

Code:
    
FlowRateInlet
{
    type                faceSource;
    functionObjectLibs ("libfieldFunctionObjects.so");
    enabled           true;
    outputControl   timeStep;
    log                  false;
    valueOutput     true;
    source            patch;
    sourceName   inlet;
    operation        sum;
    fields
    (
        phi
    );
        
    surfaceFormat   null;
}
This will write to a file postProcessing/FlowRateInlet/0/faceSource.dat If you use the foamMonitor script (requires gnuPlot) you can monitor the flowrate during the run.

Regards,
Tom
tomf is offline   Reply With Quote

Old   November 3, 2015, 16:39
Default
  #3
rsa
New Member
 
Reza
Join Date: Jun 2012
Posts: 27
Rep Power: 14
rsa is on a distinguished road
tanx Tom

now I can monitor my inflow-outflow while running. I am wondering if you can help me with one other thing. I want to monitor the pressure at certain coordinate. I have a experimental results and I want to save the pressure at a certain coordinate into a file. I am currently using the experimental results for validation of my model so I am wondering how I can save pressure at certain coordinate the same as the inflow-outflow.

appreciate your help.

/Reza
rsa is offline   Reply With Quote

Old   November 4, 2015, 05:49
Default
  #4
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 647
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Reza,

You can use the probes functionObject. Please have a look at this page:
OpenFOAM source guide

and click on post-processing for more functions like this. Many also have examples, will be a lot quicker than asking on the forum.

Regards,
Tom
tomf is offline   Reply With Quote

Reply

Tags
boundary condition u, latesttime, openfoam, run from latesttime


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
Elastic or Plastic Deformations in OpenFOAM NickolasPl OpenFOAM Pre-Processing 36 September 23, 2023 09:22
How to export time series of variables for one point? mary mor OpenFOAM Post-Processing 8 July 19, 2017 11:54
To change temperature in mass flow inlet boundary condition per iteration ajinkya201991 FLUENT 1 July 11, 2014 12:29
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33


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