|
[Sponsors] |
February 7, 2021, 13:51 |
Pulsed Source Term in OpenFOAM
|
#1 |
New Member
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9 |
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! |
|
February 7, 2021, 16:17 |
|
#2 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
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.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
February 7, 2021, 18:32 |
|
#3 |
New Member
Taaresh
Join Date: Nov 2017
Posts: 7
Rep Power: 9 |
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! |
|
Tags |
oscillating source, periodic source term, pulsed source term, source frequency |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using PengRobinsonGas EoS with sprayFoam | Jabo | OpenFOAM Running, Solving & CFD | 36 | July 16, 2024 04:52 |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 11:57 |