[Getdp] Resolution with a parameter

Peter Kis md2z34 at gmail.com
Thu Aug 13 16:34:25 CEST 2015


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20150813/c6b5466a/attachment.html>