Discussion Forum

Initial values from a PDE

Topics: Solving, 4.2a

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   8 Replies   Last post: June 4, 2012 9:27am UTC
Jens Krause

Jens Krause

May 31, 2012 6:04am UTC

Initial values from a PDE

Hallo Comsol - expert,

I am trying to setup a transient simulation where the initial values of the dofs are
calculated in a dedicated physics node. All is in a 2-D plane.

The transient simulation is a PDE General Form ("g") with Hx, Hy as unknowns (think of
magnetic field strengths). I am interested in the transient behaviour starting from
a particular crafted initial state.

For the initial state I want to solve a stationary magnetis simulation ("mf", unknown Az).
From the solution I can derive the magnetic field strength (mf.Hx and mf.Hy) which are
the desired initial values for "g".

How can I transfer the output data of one physics section as initial values to anoteher
physics section?

I tried:
1. Study1 only solves "mf"
2. Study2 only solves in "g"
3. Study2 in the section "Values of variables that you do not solve for" I refer to Study1
(Method ="Solution" and Study="Study"
4. In "g" I use mf.Hx and mf.Hy as initial values.

BUT the initial values are all zero.

Does anyone have an idea to fix my approach or different ideas?
I could live with saving data to a file and reloading it.

Thanks for any hints.

Jens


Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

May 31, 2012 6:15am UTC in response to Jens Krause

Re: Initial values from a PDE

Hi

check the help and the doc about the Solver Values of Dependent Variables tab, and the "Dependent Variables" sub node here you define where you get the initial values from or the solved and the unsolved variables

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Jens Krause

Jens Krause

May 31, 2012 6:29am UTC in response to Ivar Kjelberg

Re: Initial values from a PDE

Hi Ivar,

I did that already and tried all possible settings and all remains zero. The help
refers to using solutions from different study steps but for the same physics.

What I need is cross initialisation.


Jens

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

May 31, 2012 7:01am UTC in response to Jens Krause

Re: Initial values from a PDE

Hi

then have you tried to use the variables from the previous models in the initial tab ? If you work on the same geoemtry it should go

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Jens Krause

Jens Krause

May 31, 2012 7:23am UTC in response to Ivar Kjelberg

Re: Initial values from a PDE


Hi

then have you tried to use the variables from the previous models in the initial tab ? If you work on the same geoemtry it should go

--
Good luck
Ivar




Hi Ivar,

well I used "mf.Hx" in the initial tab. Is that what you mean with "variables"?

I attach a simplified model, which just does initialsation in the transient study.

Thanks

Jens

Attachments:   initial_values.mph  

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

June 1, 2012 6:55am UTC in response to Jens Krause

Re: Initial values from a PDE

Hi

I'm used to have both solver sequences under the same study node, then I'm sure the link is done.

But what puzzles me is that whatever I use as initial conditions, your PDE solves always to the same patterns and values, so Ibelieve something is not as you expected in your PDE, and that the transmission of the initial condition is done correctly, either in my way or in yours with 2 studies, if you link them at the dependent variable node


--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Jens Krause

Jens Krause

June 4, 2012 7:35am UTC in response to Ivar Kjelberg

Re: Initial values from a PDE

Hi,

I tried both and also when the stationary is in the same study the link is
not done.

On the PDE node I do not change the settings after creating
the node (except for the initial conditions).

I'm asking support,

Thanks,

Jens

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

June 4, 2012 8:07am UTC in response to Jens Krause

Re: Initial values from a PDE

Hi

For me they are passing correctly (or as COSMOl expect them to), but I suspect you have something wrong in your PDE physics.
Have you tried to solve your PDE alone with different initial values ?

--
Good luck
Ivar

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Jens Krause

Jens Krause

June 4, 2012 9:27am UTC in response to Ivar Kjelberg

Re: Initial values from a PDE

Hi,

interessting that it works for you. I tried someting very simple

Hx=x
Hy=y

and these initial conditions are considered correctly. But the
values from the other physics not.

What are your setting in "Values of variables that you do not solve for"?
Is there something users usually do wrong?


Jens

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines