### Finding a Subfunction

63
views
0
4 weeks ago by
I've been wracking my brain trying to figure out how to do this. Lets say I have a (simplified) trial function  $f\left(x,y\right)=g\cdot f\left(c,y\right)$ƒ (x,y)=g·ƒ (c,y) where c is some constant. How do I implement  $f\left(c,y\right)$ƒ (c,y) ?
Community: FEniCS Project
$\frac{dc_s}{dt}=\frac{1}{r^2}\cdot\frac{d}{dr}\left(D_sr^2\cdot\frac{dc_s}{dr}\right)$dcsdt =1r2 ·ddr (Dsr2·dcsdr )
$\frac{dc_s}{dr}=-\frac{jR_s}{Ds},r=1$dcsdr =jRsDs ,r=1
and    $j\left(c_s\left(x,r=1\right),c_e\left(x\right),\alpha_s\left(x\right),\alpha_e\left(x\right)\right)$j(cs(x,r=1),ce(x),αs(x),αe(x))  , Rs, and Ds are defined on a separate 1D, 2D, or 3D mesh that has the same x as the first axis. Also   $c_s,c_e,\alpha_s,\alpha_e,j$cs,ce,αs,αe,j  form a system of PDE's. The reason for separating the  $c_s$cs domain is that it's considered a 'pseudo' dimension that doesn't change regardless of whether or not the remaining equations (physical dimensions) are in 1D or 3D, and so that the physical dimensions are representative of the battery I am trying to model. My main problem is translating j from the physical mesh to the pseudo mesh and translating  $c_s\left(x,r=1\right)$cs(x,r=1) from the pseudo mesh to the physical mesh such that I can define the system to be solved using the FEniCS nonlinear solver.