From pawel.kw at gmail.com Thu Apr 9 15:28:47 2020 From: pawel.kw at gmail.com (=?UTF-8?Q?Pawe=C5=82_Kwa=C5=9Bniewski?=) Date: Thu, 9 Apr 2020 21:28:47 +0200 Subject: [SciPy-User] Thermal radiation heat transfer between surfaces Message-ID: Dear SciPy community, I'm a bit stuck trying to simulate heat transfer by radiation only (elements in a vacuum chamber). The problem involves calculating the so called view factor (well explained in section 4 of http://mafija.fmf.uni-lj.si/seminar/files/2015_2016/Thermal_radiation_heat_transfer_between_surfaces_Luka_Klobucar.pdf), which is a double surface integral. I was hoping to find some ready Python code, but I failed. Maybe someone is aware of either heat transfer calculation libraries in Python or just 3D view factor calculations? If not, maybe some hints on numerical calculations of surface integrals in Python? I've found view3d , but the code is rather outdated and I'm struggling to compile it (I tried Windows 10, Archinux, Ubuntu, but I'm an amateur in software building). Best, Pawel -------------- next part -------------- An HTML attachment was scrubbed... URL: From panosz at gmail.com Thu Apr 9 17:21:50 2020 From: panosz at gmail.com (Panagiotis Zestanakis) Date: Fri, 10 Apr 2020 00:21:50 +0300 Subject: [SciPy-User] Thermal radiation heat transfer between surfaces In-Reply-To: References: Message-ID: Dear Pawel. In order to compute a surface integral, first you should parametrize your surface and express it as a double integral. A similar procedure is followed for example in eq.30 in the document. After that, `dbquad`, `tpquad` or `nquad` from scipy.integrade should do the job. In case your surface is composed of distinct polygons, maybe you should consider replacing the integral with a sum. I hope this helps. Best, Panos On Thu, Apr 9, 2020 at 10:29 PM Pawe? Kwa?niewski wrote: > Dear SciPy community, > > I'm a bit stuck trying to simulate heat transfer by radiation only > (elements in a vacuum chamber). The problem involves calculating the so > called view factor (well explained in section 4 of > http://mafija.fmf.uni-lj.si/seminar/files/2015_2016/Thermal_radiation_heat_transfer_between_surfaces_Luka_Klobucar.pdf), > which is a double surface integral. I was hoping to find some ready Python > code, but I failed. Maybe someone is aware of either heat transfer > calculation libraries in Python or just 3D view factor calculations? If > not, maybe some hints on numerical calculations of surface integrals in > Python? I've found view3d > , > but the code is rather outdated and I'm struggling to compile it (I tried > Windows 10, Archinux, Ubuntu, but I'm an amateur in software building). > > Best, > > Pawel > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.kw at gmail.com Fri Apr 10 05:28:06 2020 From: pawel.kw at gmail.com (=?UTF-8?Q?Pawe=C5=82_Kwa=C5=9Bniewski?=) Date: Fri, 10 Apr 2020 11:28:06 +0200 Subject: [SciPy-User] Thermal radiation heat transfer between surfaces In-Reply-To: References: Message-ID: Thank you Panos. My geometry is rather simple, so I suppose I will try calculating the integrals as you suggested. Best, Pawel czw., 9 kwi 2020 o 23:22 Panagiotis Zestanakis napisa?(a): > Dear Pawel. > > In order to compute a surface integral, first you should parametrize your > surface and express it as a double integral. > A similar procedure is followed for example in eq.30 in the document. > > After that, `dbquad`, `tpquad` or `nquad` from scipy.integrade should do > the job. > > In case your surface is composed of distinct polygons, maybe you should > consider replacing the integral with a sum. > I hope this helps. > > Best, > > Panos > > On Thu, Apr 9, 2020 at 10:29 PM Pawe? Kwa?niewski > wrote: > >> Dear SciPy community, >> >> I'm a bit stuck trying to simulate heat transfer by radiation only >> (elements in a vacuum chamber). The problem involves calculating the so >> called view factor (well explained in section 4 of >> http://mafija.fmf.uni-lj.si/seminar/files/2015_2016/Thermal_radiation_heat_transfer_between_surfaces_Luka_Klobucar.pdf), >> which is a double surface integral. I was hoping to find some ready Python >> code, but I failed. Maybe someone is aware of either heat transfer >> calculation libraries in Python or just 3D view factor calculations? If >> not, maybe some hints on numerical calculations of surface integrals in >> Python? I've found view3d >> , >> but the code is rather outdated and I'm struggling to compile it (I tried >> Windows 10, Archinux, Ubuntu, but I'm an amateur in software building). >> >> Best, >> >> Pawel >> _______________________________________________ >> SciPy-User mailing list >> SciPy-User at python.org >> https://mail.python.org/mailman/listinfo/scipy-user >> > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bhare8972 at hotmail.com Tue Apr 14 04:39:47 2020 From: bhare8972 at hotmail.com (Brian Hare) Date: Tue, 14 Apr 2020 08:39:47 +0000 Subject: [SciPy-User] optimize.least_squares memory allocation every function call Message-ID: I have a question about the scipy.optimize.least_squares function. I have found that the function to optimize needs to reallocate the return array every time the function is called. I've tried having the calling function return the same array every time (just re-filled with the correct return values), but least_squares doesn't seem to converge when I do this. I do not like having to allocate memory in the calling function, this seems slow and unnecessary. Is there a way around this? If not, could scipy.optimize.least_squares be adjusted so this is possible? The Gnu Scientific Library (which I sometimes fall back on when scipy.optimize.least_squares is too slow, I think this allocation issue is one major contributor), passes an array to the calling function to fill. Thank you, Brian Hare -------------- next part -------------- An HTML attachment was scrubbed... URL: From stanczakdominik at gmail.com Tue Apr 14 05:01:12 2020 From: stanczakdominik at gmail.com (=?UTF-8?Q?Dominik_Sta=C5=84czak?=) Date: Tue, 14 Apr 2020 11:01:12 +0200 Subject: [SciPy-User] optimize.least_squares memory allocation every function call In-Reply-To: References: Message-ID: Hey Brian, I haven't tested this, but, off the top of my head: would it not be possible to pass a pre-existing allocated array as a `kwarg` to the function, and have your function write values into that array? Then you can add it to the `least_squares` call as `{"return_array": np.zeros(N)}). Cheers, Dominik On Tue, 14 Apr 2020 at 10:40, Brian Hare wrote: > I have a question about the scipy.optimize.least_squares function. I have > found that the function to optimize needs to reallocate the return array > every time the function is called. I've tried having the calling function > return the same array every time (just re-filled with the correct return > values), but least_squares doesn't seem to converge when I do this. > > I do not like having to allocate memory in the calling function, this > seems slow and unnecessary. Is there a way around this? If not, could scipy.optimize.least_squares > be adjusted so this is possible? > > The Gnu Scientific Library (which I sometimes fall back on when scipy.optimize.least_squares > is too slow, I think this allocation issue is one major contributor), > passes an array to the calling function to fill. > > Thank you, > Brian Hare > _______________________________________________ > SciPy-User mailing list > SciPy-User at python.org > https://mail.python.org/mailman/listinfo/scipy-user > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyfaff at gmail.com Tue Apr 14 05:03:50 2020 From: andyfaff at gmail.com (Andrew Nelson) Date: Tue, 14 Apr 2020 19:03:50 +1000 Subject: [SciPy-User] optimize.least_squares memory allocation every function call In-Reply-To: References: Message-ID: How big a return array are we talking about? 1000 values, 100000? -------------- next part -------------- An HTML attachment was scrubbed... URL: From charlesr.harris at gmail.com Sun Apr 19 16:44:05 2020 From: charlesr.harris at gmail.com (Charles R Harris) Date: Sun, 19 Apr 2020 14:44:05 -0600 Subject: [SciPy-User] NumPy 1.18.3 released. Message-ID: Hi All, On behalf of the NumPy team I am pleased to announce that NumPy 1.18.3 has been released. This release contains various bug/regression fixes for the 1.18 series The Python versions supported in this release are 3.5-3.8. Downstream developers should use Cython >= 0.29.15 for Python 3.8 support and OpenBLAS >= 3.7 to avoid errors on the Skylake architecture. Wheels for this release can be downloaded from PyPI , source archives and release notes are available from Github . *Highlights* Fix for the method='eigh' and method='cholesky' options in numpy.random.multivariate_normal. Those were producing samples from the wrong distribution. *Contributors* A total of 6 people contributed to this release. People with a "+" by their names contributed a patch for the first time. - Charles Harris - Max Balandat + - @Mibu287 + - Pan Jan + - Sebastian Berg - @panpiort8 + *Pull requests merged* A total of 5 pull requests were merged for this release. - #15916: BUG: Fix eigh and cholesky methods of numpy.random.multivariate_normal - #15929: BUG,MAINT: Remove incorrect special case in string to number... - #15930: BUG: Guarantee array is in valid state after memory error occurs... - #15954: BUG: Check that pvals is 1D in _generator.multinomial. - #16017: BUG: Alpha parameter must be 1D in _generator.dirichlet Cheers, Charles Harris -------------- next part -------------- An HTML attachment was scrubbed... URL: From warren.weckesser at gmail.com Sun Apr 19 17:46:02 2020 From: warren.weckesser at gmail.com (Warren Weckesser) Date: Sun, 19 Apr 2020 17:46:02 -0400 Subject: [SciPy-User] [SciPy-Dev] NumPy 1.18.3 released. In-Reply-To: References: Message-ID: On 4/19/20, Charles R Harris wrote: > Hi All, > > On behalf of the NumPy team I am pleased to announce that NumPy 1.18.3 has > been released. This release contains various bug/regression fixes for the > 1.18 series Thanks Chuck! Warren > > The Python versions supported in this release are 3.5-3.8. Downstream > developers should use Cython >= 0.29.15 for Python 3.8 support and OpenBLAS >>= 3.7 to avoid errors on the Skylake architecture. Wheels for this > release can be downloaded from PyPI > , > source archives and release notes are available from Github > . > > *Highlights* > > Fix for the method='eigh' and method='cholesky' options in > numpy.random.multivariate_normal. Those were producing samples from the > wrong distribution. > > *Contributors* > > A total of 6 people contributed to this release. People with a "+" by > their > names contributed a patch for the first time. > > - Charles Harris > - Max Balandat + > - @Mibu287 + > - Pan Jan + > - Sebastian Berg > - @panpiort8 + > > > > *Pull requests merged* > A total of 5 pull requests were merged for this release. > > - #15916: BUG: Fix eigh and cholesky methods of > numpy.random.multivariate_normal > - #15929: BUG,MAINT: Remove incorrect special case in string to > number... > - #15930: BUG: Guarantee array is in valid state after memory error > occurs... > - #15954: BUG: Check that pvals is 1D in _generator.multinomial. > - #16017: BUG: Alpha parameter must be 1D in _generator.dirichlet > > > Cheers, > > Charles Harris > From quic_sanirudh at quicinc.com Tue Apr 21 02:10:14 2020 From: quic_sanirudh at quicinc.com (quic_sanirudh) Date: Tue, 21 Apr 2020 06:10:14 +0000 Subject: [SciPy-User] Doubt about float16 type support on scipy.signal.convolve2d method Message-ID: Hi, I'm new to this community and in general to scipy. I tried to use the scipy.signal.convolve2d method with the call shown below, where a and b are of types float16. scipy.signal.convolve2d(a, b, mode='valid') I get the below error, and wanted to check if float16 types are not supported in the convolve2d method by design or if this could be a missed feature. ValueError: convolve2d not available for this type. Let me know if I have made any mistakes or if this I can perform float16 convolve2d using a different function perhaps. Thanks, Anirudh -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikofski at berkeley.edu Thu Apr 23 14:35:33 2020 From: mikofski at berkeley.edu (Dr. Mark Alexander Mikofski PhD) Date: Thu, 23 Apr 2020 11:35:33 -0700 Subject: [SciPy-User] ANN: pvlib v0.7.2 In-Reply-To: <2D02E2D3-3110-4616-A93E-90D4EB390667@sandia.gov> References: <2D02E2D3-3110-4616-A93E-90D4EB390667@sandia.gov> Message-ID: pvlib has a new minor release, v0.7.2 Release Notes: https://pvlib-python.readthedocs.io/en/v0.7.2/whatsnew.html PyPI: https://pypi.org/project/pvlib/ Read the Docs: https://pvlib-python.readthedocs.io/en/latest/ GitHub: https://github.com/pvlib/pvlib-python Highlights: - add new module pvlib.snow to contain models related to snow coverage and effects on a PV system. (GH764< https://github.com/pvlib/pvlib-python/pull/764>) - Renamed pvlib.losses to pvlib.soiling. Additional loss models will go into code modules named for the loss or effect type. (GH935< https://github.com/pvlib/pvlib-python/issues/935>, GH891< https://github.com/pvlib/pvlib-python/issues/891>) - updated compatibility with cftime 1.1. (GH895< https://github.com/pvlib/pvlib-python/issues/895>) There are a few breaking API changes and bug fixes. Users are advised to read the release notes before updating. ---------- Forwarded message --------- From: Stark, Cameron Thomas via Python-announce-list < python-announce-list at python.org> Date: Wed, Apr 22, 2020, 5:58 PM Subject: pvlib v0.7.2 To: Cc: Stark, Cameron Thomas pvlib has a new minor release, v0.7.2 Release Notes: https://pvlib-python.readthedocs.io/en/v0.7.2/whatsnew.html PyPI: https://pypi.org/project/pvlib/ Read the Docs: https://pvlib-python.readthedocs.io/en/latest/ GitHub: https://github.com/pvlib/pvlib-python Highlights: - add new module pvlib.snow to contain models related to snow coverage and effects on a PV system. (GH764< https://github.com/pvlib/pvlib-python/pull/764>) - Renamed pvlib.losses to pvlib.soiling. Additional loss models will go into code modules named for the loss or effect type. (GH935< https://github.com/pvlib/pvlib-python/issues/935>, GH891< https://github.com/pvlib/pvlib-python/issues/891>) - updated compatibility with cftime 1.1. (GH895< https://github.com/pvlib/pvlib-python/issues/895>) There are a few breaking API changes and bug fixes. Users are advised to read the release notes before updating. -- Python-announce-list mailing list -- python-announce-list at python.org To unsubscribe send an email to python-announce-list-leave at python.org https://mail.python.org/mailman3/lists/python-announce-list.python.org/ Support the Python Software Foundation: http://www.python.org/psf/donations/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjczec01 at gmail.com Wed Apr 29 17:10:15 2020 From: tjczec01 at gmail.com (Travis Czechorski) Date: Wed, 29 Apr 2020 17:10:15 -0400 Subject: [SciPy-User] Interpolator coefficients for Radau method in solve_ivp Message-ID: Hello, I am trying to figure out how to calculate the following coefficients in the source code for the Radau integration method. # Interpolator coefficients.P = np.array([ [13/3 + 7*S6/3, -23/3 - 22*S6/3, 10/3 + 5 * S6], [13/3 - 7*S6/3, -23/3 + 22*S6/3, 10/3 - 5 * S6], [1/3, -8/3, 10/3]]) -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjczec01 at gmail.com Wed Apr 29 17:11:53 2020 From: tjczec01 at gmail.com (Travis Czechorski) Date: Wed, 29 Apr 2020 17:11:53 -0400 Subject: [SciPy-User] Interpolator coefficients for Radau method in solve_ivp In-Reply-To: References: Message-ID: Hello, I am trying to figure out how to calculate the following coefficients in the source code for the Radau integration method. # Interpolator coefficients.P = np.array([ [13/3 + 7*S6/3, -23/3 - 22*S6/3, 10/3 + 5 * S6], [13/3 - 7*S6/3, -23/3 + 22*S6/3, 10/3 - 5 * S6], [1/3, -8/3, 10/3]]) I read that it uses a cubic polynomial to interpolate, can someone provide me with the process to calculate these coefficients? Thanks, On Wed, Apr 29, 2020 at 5:10 PM Travis Czechorski wrote: > Hello, > > I am trying to figure out how to calculate the following coefficients in > the source code for the Radau integration method. > > # Interpolator coefficients.P = np.array([ [13/3 + 7*S6/3, -23/3 - 22*S6/3, > 10/3 + 5 * S6], > [13/3 - 7*S6/3, -23/3 + 22*S6/3, 10/3 - 5 * S6], > [1/3, -8/3, 10/3]]) > -------------- next part -------------- An HTML attachment was scrubbed... URL: