English 中文(简体)
努力执行 Fick s first law of pornography in a model of water movement over cell membrane
原标题:Trying to implement Fick s first law of diffusion in a simulation of water movement across cell membrane
  • 时间:2012-01-14 14:30:42
  •  标签:
  • python

I want to do the above simulation using fick s law with the use of finite differences. My problem is at the set up of the whole problem.

我将从该文件中列举一些价值观和宣言,以及我如何设法加以落实。

<>物理特性:

  1. The initial volume of the cell ,V0.
  2. The initial volume of osmotically active water within the cell,Viw0.

这里,我是:

V0 = ... # just a variable
V = sc.zeros(5) 
V[0] = ...  # this goes for Viw0

www.un.org/Depts/DGACM/index_spanish.htm

  1. Initial concentration of solute within the cell , Ci0
  2. Concentration in the bulk medium C7 (this goes out of the cell)

在这方面,我确实:

C = sc.zeros(5)
C[0] = ... #this goes for Ci0
C7 = ...

www.un.org/Depts/DGACM/index_spanish.htm 第一部法律:

F = -D * dc/dx

# F 每一单位的转账率

# c 分散物质集中

# x 空间协调部分正常测量

在此,我不知道这项职能的论点是:

def F(what to put here?):

        dc = 0.1    # I don t know what to do with the dc!
        return -(D*dc)/dx

此外,如何实施有限的差别方法? (一) 采用这种方法的类别。

以下是与该文件的联系:

Page 1
Page 2
Page 3
Page 4

最佳回答

你们说的是,集中程度是否是系统自由的某种程度,或者你将如何模仿大规模运输,或者说什么是问题的时间特征(例如,你是否想分析瞬时或稳定的国家问题?)。 因此,试图建议如何制定法典来解决这种描述不周的问题既为时过早,也无用。

回答你问题中唯一部分敏感的部分,对第一项命令进行计算,对流体术语进行一层限定的区别,你可能这样做:

import numpy as np

def F(c,D,x):
    """Assume c and x are numpy arrays of equal size and D is a scalar"""
    # differencing of the concentration field
    deltac = np.diff(c)
    deltax = np.diff(x)

    return -D * deltac / deltax

There are a lot of subtleties in selection of appropriate order and direction of differencing depending on the actual system of differential equations and their properties, but that is far beyond the scope of this question and the information that has been given about the problem.

问题回答

If I understand your question, it seems you want to write a program to help visualize diffusion across these various cells. The animated GIF on the Fick s Law Wikipedia page should help us think about what such a graph/plot/gradient may look like. I m not suggesting that you need to create an animation, but I believe part of your work might be to show various diffusion gradients (the bottom row) as a function of the properties of a given cell (i.e. the concentration, spatial coordinate and/or a value of D).

因此,经过微薄的搜索,我认为这份文件可能有助于将这一问题视为一种游戏:。 The Diffusion Hor - Usingic Mathsbook to Promote the Hands on a Greatpl (pdf). 《疾病法》从该文件的大约一半开始。

But, if you re going to be creating gradient plots, you should take a look at the matplotlib module for Python as mentioned in this question: Gradient facecolor matplotlib bar plot.

最后,如果你只想原始数据(即数字)的话,努力回答你的问题。 我认为,你希望创造出一种可能值的矢量,即扩散物质、c和空间协调的浓度。 否则,视像代表使用校正。 在沙尔,浓度参数值的矢量可能看起来如此:

c = [round(i*0.1, 2) for i in range(0, 10)]    # not sure of the typical range

这份清单是一份清单,内容是<代码>[0.0、0.1、0.2、0.3、0.4、0.5、0.6、0.7、0.8、0.9]。 (I use round(>>,因为我看到0.300000004 是其中之一)。) 为了将F定义为不同 c、x和D值的矩阵,你可以这样做。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签