[esp-r] Re: simulation toggles from command line (implicit explicit schemes)
Ferguson, Alex
Alex.Ferguson at NRCan-RNCan.gc.ca
Fri Aug 2 14:49:17 BST 2013
Revision 6485 on development_branch added the capability you're looking for:
http://espr.trac.cvsdude.com/esp-r/changeset/6485/branches/development_branch
To use it, add the following to your .cfg file (typically below the *clm/*stdmscldb/*stdpdb/*stdsbem tags):
*sim-toggle bld-soln-implicitness 1.000
I'm not sure about your motivations for using the fully-implicit solution, but I added this feature because I observed the default Crank-Nicolson often produces undamped oscillations in the predicted zone heat injection and extraction. Users are often oblivious because --- by default --- ESP-r runs with time-step-averaging enabled. But the oscillations to produce tangible effects when you add an explicit or implicit plant model with non-linear performance curves or discrete operating modes. HVAC energy consumption predictions can be inaccurate as well.
When stable, the Crank-Nicolson method is more efficient and more accurate than the fully-implicit method. But the fully-implicit method is unconditionally stable. It approximates the true analytic solution as long as the time steps are sufficiently small.
For these reasons, I use the fully implicit method at all times, and I specify a smaller-than-necessary time step. It's inefficient, but I have more confidence in the results.
- Alex
-----Original Message-----
From: esp-r-bounces at lists.strath.ac.uk [mailto:esp-r-bounces at lists.strath.ac.uk] On Behalf Of Andrew Cowie
Sent: August 2, 2013 05:35
To: Sébastien Brideau; esp-r at lists.strath.ac.uk
Subject: [esp-r] Re: simulation toggles from command line (implicit explicit schemes)
Hi Sébastien,
Im not 100% sure, but from my reading of the ESP-r methodology I believe the solvers are programmed in a Crank-Nicholson scheme. To use a fully implicit scheme could introduce numerical instability which the solvers may be ill equipped to handle. Regardless, it seems that you have identified the variable in the code that you need to change in order to do this. If there is not already a way to do this on the command line, it is not difficult to add command line arguments to the bps module in the file startup.F. All you would need to do then is put a flag in a COMMON block and override the existing code that sets this variable. I would advise caution however, as my experience of fiddling with the solvers is it tends to have unexpected results!
There is a file distributed with the source code, I think somewhere in the manual directory, called something like command_line_hints if memory serves. If there is an existing way to do what you want to do, it will probably be in there.
Regards,
Andy Cowie
________________________________________
From: esp-r-bounces at lists.strath.ac.uk [esp-r-bounces at lists.strath.ac.uk] On Behalf Of Sébastien Brideau [sebastien.brideau at gmail.com]
Sent: 02 August 2013 02:20
To: esp-r at lists.strath.ac.uk
Subject: [esp-r] simulation toggles from command line (implicit explicit schemes)
Hi all,
Is anybody aware of a way to call the bps with a "flag" that would override the default setting for implicit/explicit scheme? I want to run a simulation where the plant is solved fully implicitly (variable impexp = 1).
I am asking because I want to run a ESP-r TRNSYS co-simulation and the input file to the co-simulator requires the command to call the bps. Can't do it with the GUI.
Thanks for any help,
Sébastien Brideau
sebastien.brideau at gmail.com<mailto:sebastien.brideau at gmail.com>
_______________________________________________
esp-r mailing list
esp-r at lists.strath.ac.uk
http://lists.strath.ac.uk/mailman/listinfo/esp-r
More information about the esp-r
mailing list