MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Table to calculate faster

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122440] Re: Table to calculate faster
  • From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
  • Date: Fri, 28 Oct 2011 05:37:33 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201110271032.GAA08914@smc.vnet.net>


Also, masonry is missing. Some ideas could be to use

T[..]:=T[..]=Evaluate[....]

or some such combination.

It is really better to send examples that actually have working code.

Another approach could be to use linear algebra A.T=b

Oliver

On Thu, 27 Oct 2011, Jacopo Bertolotti wrote:

> Maybe it's just me but it looks like the definition of each T[n,t]
> depends on the evaluation of the matrix itself on a previous time and so
> on iteratively. Since the code does not include any starting condition
> at t==0 all three definition enter a infinite loop preventing any useful
> evaluation.
>
> Best regards
>
> Jacopo
>
> On 10/26/2011 11:38 PM, Michelle Maul wrote:
>> I am trying to perform a heat transfer calculation on a wall with
>> transient heating.  I am using rules so that we can easily change the
>> material.  I want to be able to do several hundred time steps but I am
>> only able to get about 10 in an hour.  It is a pretty straight forward
>> calculation so I'm wondering why it is taking so long to compute.
>> This is a calculation that Excel would be good at because it is taking
>> data from the cells above it to solve.  Help please
>>
>> T[0, t_] := (1. -
>>         2. \[Tau] - (2. \[Tau] Subscript[h, in] \[CapitalDelta]x)/k) T[
>>        0, t - 1] +
>>      2. \[Tau] T[1,
>>        t - 1] + (2. \[Tau] Subscript[h, in] \[CapitalDelta]x)/k*
>>       Subscript[T, in] /. masonry;
>>
>> T[m_, t_] := \[Tau] (T[m - 1, t - 1] + T[m + 1, t - 1]) + (1. -
>>         2. \[Tau]) T[m, t - 1] /. masonry;
>>
>> T[5, t_] := (1. - 2. \[Tau] -
>>         2. \[Tau] (Subscript[h, out] \[CapitalDelta]x)/k) T[5,
>>        t - 1] + 2. \[Tau] T[4, t - 1] +
>>      2. \[Tau] (Subscript[h, out] \[CapitalDelta]x)/
>>       k*(Subscript[T, out] /. {x ->  t}) +
>>      2. \[Tau] (\[Kappa] *(Subscript[q,
>>          solar] /. {x ->  t}) \[CapitalDelta]x)/k /. masonry;
>>
>> solution = Transpose[Table[T[n, x], {n, 0, 5}, {x, 0, 24}]]
>>
>> Thank you
>>
>>
>
>
>

-- 



  • Prev by Date: Re: Multiple integration: bug?
  • Next by Date: InputAliases
  • Previous by thread: Re: Table to calculate faster
  • Next by thread: Mathematica 8.0.4 now available