On Tue, Oct 28, 2014 at 10:33 AM, Gaaß, Markus <[email protected]>
wrote:

>
> I would like to change that now and carry the simulation over to Python
> and FiPy.
>
> Question 1:
> Can I do that and how would I do that?
>

Yes you can and it will probably solve in FiPy. For these purely hyperbolic
problems (I'm assuming that this is the case just having glanced at the
equations), higher order discretization is often used. If you are not
trying to track a shock then you might get away with the first order terms
in FiPy. FiPy does have one second order term that you might help. CLAWPACK
is another alternative for hyperbolic problems.



>
> Question 3:
> How do I incorporate the fact that most of the factors (like rho_G,
> c_G/S_star, m_GS_dot, q_GS_dot, and h_ads) are functions of one or more
> solution variables?
>

You have to think about this a little bit. Generally, you can just "sweep"
the solution to convergence using Picard iterations.


>
> Question 4:
> We usually formulate the initial condition as some sort of equilibrium
> state of the packed bed reactor, like
>
> the initial water content of the gas phase X_G_init = X_G_init(X_S_init,
> T_G_init, T_S_init)
> the initial water content of the adsorbent X_S_init
> the initial temperature of the gas phase T_G_init
> the initial temperature of the adsorbent T_S_init
>
> and the boundary condition at the "entrance" or "left boundary" of the
> reactor as the conditions of the incoming gas, like
>
> the water content of the incoming gas X_G_in
> the water content of the adsorbent at the entrance X_S_in = X_S_in(X_G_in,
> T_G_in, T_S_in)
> the temperature of the incoming gas T_G_in
> the temperature of the adsorbent at the entrance T_S_in
>
> How is this done in the case of FiPy?
>

FiPy does nothing special, but you know the geometry so you can just assign
values based on spatial position using any functional relationship you
like. You can define any boundary condition as you would in any standard FV
method. Using source terms to represent the boundaries mostly any standard
representation or update is possible, but convergence is always a concern.



>
> Question 5:
> In Matlab I set the x_grid for the spatial discretization. The t_grid is
> just to tell Matlab where (or rather when) I want it to return the values
> of the solution. The actual time step is adapted automatically by Matlab
> according to the needs of the problems. Sometimes here the solver returns
> the message that the time step could not be further reduced because some
> limit was hit and no solution could be found.
>
> How do I determine a sensible time step in FiPy?
>

FiPy has no in built mechanism for selecting a time step. The CFL number is
always the best starting point for a hyperbolic problem and it's easy to
calculate a time step from that.


>
> I am sorry for asking so many questions all at once but from studying the
> 1D level set advection example I didn't gain enough understanding for my
> actual problem.
>

I hope you make some progress. Feel free to ask more questions if you start
to implement something.

Thanks,

Daniel

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to