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

Pulsed Source Term in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2021, 12:51
Default Pulsed Source Term in OpenFOAM
  #1
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 8
taaresh01 is on a distinguished road
Hello FOAMers!

I am trying to model a dimensionedScalar source term in a particular region of the mesh, which pulsates with time, i.e. this source term is a square wave which is ON for a period of t1 seconds, and then is OFF for the next t2 seconds, and so on. Let's say I want to simulate "p" pulses of this type. Basically, there is an associated frequency for this source. It also varies in space, but I think I can take care of that part. Could someone let me know how I can go about implementing this periodic (in time) source term?

PS - I am a novice at OF development at this point. Thank you in advance!
taaresh01 is offline   Reply With Quote

Old   February 7, 2021, 15:17
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
I think you can scan the available fvOptions first. If not available, please modify the fvOption closest to your application. Function1 and PatchFunction1 for the time-variant ramp and square functions (and others) are available as well.

https://develop.openfoam.com/Develop...ources/derived


https://develop.openfoam.com/Develop...ions/Function1


Hope these can give a useful start for you.
HPE is offline   Reply With Quote

Old   February 7, 2021, 17:32
Default
  #3
New Member
 
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 8
taaresh01 is on a distinguished road
Thank you @HPE. I'll take a look at these. I was actually able to implement it using a basic if/else structure by defining bool flags for the pulses (ON period) and gaps between pulses (OFF period). But it would be nice to see if I can use/modify some existing fvOptions functionality to do it in a better way.

Thank you!
taaresh01 is offline   Reply With Quote

Reply

Tags
oscillating source, periodic source term, pulsed source term, source frequency


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 PengRobinsonGas EoS with sprayFoam Jabo OpenFOAM Running, Solving & CFD 35 April 29, 2022 15:35
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 tlcoons OpenFOAM Installation 13 April 20, 2016 17:34
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
friction forces icoFoam ofslcm OpenFOAM 3 April 7, 2012 10:57


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