[Getdp] Resolution with a parameter

Frederic Trillaud Pighi ftrillaudp at pumas.iingen.unam.mx
Thu Aug 13 16:40:00 CEST 2015


Dear Peter,

You may adjust your TimeFunction to your need in the constraint. It is interpolated during the resolution.

Best,

Frederic 

> On Aug 13, 2015, at 9:34 AM, Peter Kis <md2z34 at gmail.com> wrote:
> 
> Dear List Members,
> 
> I'm just wondering if it's possible to scale the current density from the time iteration loop. 
> 
> Here I introduced a parameter current_factor, 
> 
> Function{ 
>     ......
>     current_factor = 1.; 
> } 
> 
> which appears in the formulation as a scaling factor for the current density:
> 
> Formulation{ // OK 
>   {Name VectorPotentialFormulation; Type FemEquation; 
>    Quantity{ 
>      {Name Aphi; Type Local; NameOfSpace Afs;} 
>      {Name js; Type Local; NameOfSpace jfs;} 
>    } 
>    Equation{ 
>     Galerkin{ [1/mu0*Dof{Curl Aphi},{Curl Aphi}]; 
>       In Omega; Jacobian JVol; Integration I1;} 
>  
>     Galerkin{ DtDof[sigma[]*Dof{Aphi},{Aphi}]; 
>       In Omega; Jacobian JVol; Integration I1;} 
>  
>     Galerkin{ [-current_factor*Dof{js},{Aphi}]; 
>       In Omega_coil; Jacobian JVol; Integration I1;} 
>     } 
>   } 
> } 
> 
> and I'd like to update this parameter during the time iteration:
> 
> Resolution{ 
>   {Name Solution; 
>     System{ 
>       {Name Syst; NameOfFormulation VectorPotentialFormulation;} 
>     } 
>     Operation{ 
>         InitSolution[Syst];SaveSolution[Syst]; 
>         TimeLoopTheta[t0,tmax,dt,theta] {
>             current_factor = 1/1.7;  // This has no effect!!
>             Generate[Syst]; Solve[Syst]; SaveSolution[Syst]; 
>         } 
>     } 
>   } 
> }
> 
> but this has no impact on the solution. Apparently the value of current_vector is still considered one as it's defined in Functions. 
> 
> Is there any way to update this parameter from the time loop? 
> 
> Thanks for your help in advance.
> 
> 
> Peter
> 
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20150813/ce1e2d08/attachment-0001.html>