|
[Sponsors] |
Stopping Criteria/Update Event for asymptotic behavior of Monitor over time |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 3, 2022, 20:57 |
Stopping Criteria/Update Event for asymptotic behavior of Monitor over time
|
#1 |
Senior Member
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 437
Rep Power: 18 |
Hi everyone!
If one needs to monitor solution convergence during the run and stop it automatically based on asymptotic behavior of some monitor (Pressure Drop for example) for the last T seconds - he surely can use Asymptotic Stopping Criteria or Asymptote Update Event with sample count (which cannot be Parameter or Report or Field Function) set to T/TimeStep. Which works perfectly. If time step is constant. But how can that be implemented in case of very variable time step? - The amount of time steps for T seconds can be very different in this case. |
|
March 4, 2022, 13:16 |
|
#2 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66 |
It checks for just the sequence and if it is asymptotic in time, which works for 99% of users. You just need to specify a large enough number of steps to check.
Actually even steady calculations (asymptotic vs iteration) has the same issue. Each iteration in each cell doesn't advance the solution by the same Flow Courant number. If you think this approach doesn't make sense for variable time-step sizes, then it wouldn't make sense either vs iteration. An asymptotic monitor is not a replacement for a temporal derivative and should not be interpreted as such. If you want to monitor temporal derivatives, then make that monitor. |
|
March 6, 2022, 07:59 |
|
#3 |
Senior Member
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 437
Rep Power: 18 |
Thank you, but that's not what I meant %)
What I mean is: there is a fixed user-input-dependent (non parametric etc) "Number of Samples" in both Asymptotic Stopping Criteria and Asymptote Update Event. So let's say I want to consider solution converged if that kind of criteria is satisfied for the last T seconds. If time step is constant - I just set Number of Samples to manually calculated T/Time Step. But if time step is very variable (let's say from 1E-6 to 1E-3) - I do not see they way to check convergence for the certain amount of physical time. |
|
March 6, 2022, 11:05 |
|
#4 |
Senior Member
Matt
Join Date: Aug 2014
Posts: 947
Rep Power: 18 |
I think what Lucky suggested was to make a report of the time derivative of your parameter (pressure drop) then setup a monitor and stopping criteria based on that, or do I misunderstand the problem?
|
|
March 6, 2022, 11:13 |
|
#5 |
Senior Member
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 437
Rep Power: 18 |
Might be a good option, but that is not the solution i'm afraid.
Time derivative convergence - again can be monitored (in stopping criteria or update event) only for certain amount of time steps, which in case of variable time step can be an unknown range of time - which is the problem. Also convergence is not neccerilly about time derivative, the monitored value (like pressure drop) is ok to be oscillating within some small range with any time derivative values (drpending on oscillations frequency and resolved time step). |
|
March 6, 2022, 12:55 |
|
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,751
Rep Power: 66 |
My remark about temporal derivatives is due to the fact that a well-bounded oscillating function will have an envelope corresponding to the lowest frequency characteristics of the temporal derivative which you can obtain by taking an FFT (in Star). But that would mean you are calculating (or trying to calculate temporal derivatives).
If your time-step size varies from 1e-06 to 1e-03 so wildlly that you have no idea what order of magnitude in physical time is elapsed, then you have bigger problems (honestly shouldn't even be using variable time-steps). I don't get why you can't just use a check make a plot of the monitor vs time and retrieve the physical time from there. Does it really matter if the corresponding time is 1 second versus 1.0159 seconds for the purpose of checking convergence? I don't understand why anyone would need that level of precision if they're not trying to retrieve the temporal derivatives. Furthermore, there isn't any deterministic boolean logic you can actually create a criteria from. Your criteria is something is asymptotic for exactly 2 seconds... But what if your simulation results in solutions at a physical time of 1.98764 seconds and 2.01654 seconds? Is your criteria now at least 2 seconds or less than 2 seconds? It doesn't work because as soon as you relax it, any interval that is greater/less-than will either always satisfy it or always violate it you now have a null criteria. And if your simulation returns exactly a time of exactly 2 seconds, well then it is a non-issue because we already know how much time has been simulated. All of this is to say that: it's not that no one has thought of this case before and hasn't tried it. It just doesn't work the way you are imagining it to work. |
|
March 8, 2022, 13:49 |
|
#7 | |||||
Senior Member
Chaotic Water
Join Date: Jul 2012
Location: Elgrin Fau
Posts: 437
Rep Power: 18 |
Quote:
Such an example already can have varying time step for different inputs. Quote:
Quote:
Quote:
If T is for example 5 seconds - than physical time would be not less than 5 seconds. Quote:
Me is very confused what's so special about it, it looks like having perfect sense to me Last edited by cwl; March 8, 2022 at 23:01. |
||||||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Slow calculation time on CFD server | killian153 | Hardware | 4 | July 27, 2021 08:28 |
Inconsistencies in reading .dat file during run time in new injection model | Scram_1 | OpenFOAM | 0 | March 23, 2018 23:29 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |
same geometry,structured and unstructured mesh,different behaviour. | sharonyue | OpenFOAM Running, Solving & CFD | 13 | January 2, 2013 23:40 |