Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spatial: Remove 'Robin' boundary conditions? #382

Closed
luciansmith opened this issue Jul 25, 2022 · 8 comments
Closed

Spatial: Remove 'Robin' boundary conditions? #382

luciansmith opened this issue Jul 25, 2022 · 8 comments
Assignees

Comments

@luciansmith
Copy link
Member

@matthiaskoenig notes that the 'Robin' boundary condition is not very common, and wanted to make sure there were implementations of it before approving the spec as an editor. Does anyone implement support for Robin in the context of sbml-spatial? If not, I'll remove it.

@fbergmann
Copy link
Member

we left them in, in the past, since JSim needed them. While they might not have yet implemented support for spatial. It does not hurt to leave them . But i'm fine with removing them too.

@luciansmith
Copy link
Member Author

At this point, I'm going to drop them in the name of simplicity, and not implying to future simulator authors that they're standard. (I'll need a corresponding change in libsbml as well.)

@luciansmith
Copy link
Member Author

Fixed with fe60dc2 and sbmlteam/libsbml#263

@luciansmith
Copy link
Member Author

Whoops, copied responses to the wrong issue:

From @jcschaff :
VCell does not support robin boundary conditions in our standard production solvers, we did use them a bit in one of our prototype moving boundary codes (there we referred to them as "mixed" boundary condition type).

VCell does have support for

  • ​Dirichlet (only at coordinate min/max boundaries​)
  • Neumann (scalar flux normal to surface - at min/max boundaries and internal surfaces)
  • Periodic (only at coordinate min/max boundaries)​

VCell does not have plans to offer Robin/Mixed boundary conditions in the near future.

@luciansmith
Copy link
Member Author

From @bartjuw :

We, JSim users, used this when dealing 1D flow through a capillary. It specifies the boundary condition for the left hand side (input).
A simple ex below:

when(x=x.min) {(-F*L/V)*(C-Cin)+D*C:x = 0;}    //  Robin Inflow boundary condition 
 C:x means partial derivative with respect to x (partial dC/dx)
Excerpt taken from this simple model:

realDomain t sec; t.min=0; t.max=10.0; t.delta=0.01;  //Time domain

real L = 0.1 cm;                                     //Spatial domain
real Ngrid=31; // steps for spatial integrator
realDomain x cm; x.min=0.0; x.max=L; x.ct=Ngrid;

real C(x,t) mM;           // Concentration variable
extern real Cin(t) mM;    // Inflowing Concentration from Function Generator
real Cout(t) mM;          // Outflowing Concentration
extern real C0(x) mM;     // Initial distribution of Material
real D= 0.00001 cm^2/sec; // Diffusion coefficient
real F=1 ml/(g*min);      // Flow (milliliters/(gram of  tissue)/minute)
real V=0.05 ml/g;          // Volume (milliters/(gram of tissue))

when(t=t.min) {C= if(x=x.min) Cin else C0;} // Initial distribution assigned to Concentration
                                            // variable
when(x=x.min) {(-F*L/V)*(C-Cin)+D*C:x = 0;}    //  Inflow boundary condition  <--- Robin condition
when(x=x.max) {C:x=0; Cout=C;}

C:t=-F*L/V*C:x + D*C:x:x ;             // Partial differential equation describing system

@luciansmith
Copy link
Member Author

bartjuw : If I recall correctly, JSim doesn't support import or export of SBML-spatial at this time, though, correct?

@luciansmith
Copy link
Member Author

From @bartjuw:
Correct, it does not support spatial package.

@luciansmith
Copy link
Member Author

(Copied over the comments and removing them from the other unrelated issue, for posterity.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants