CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Thin membrane using neumann conditions (http://www.cfd-online.com/Forums/openfoam-solving/125650-thin-membrane-using-neumann-conditions.html)

elujan October 28, 2013 15:40

Thin membrane using neumann conditions
 
Hi!,
I have a problem, I need to model a very thin membrane using neumann conditions. I used Salome Meca to create a mesh with a small sphere inside a box. The membrane is a facezone in the surface of the sphere. I created two patches that are together (cell_membrane_m and cell_membrane_s) from this facezone using createBaffles. My problem is that now I have to put a neumann condition like this:

flux normal to the surface represented by cell_membrane_m =
= flux normal to the surface represented by cell_membrane_s=
= km * ( Potential (Vm) in cell_membrane_m - Potential (Vs) in cell_membrane_s )

(last term is the transmembrane potential)

Here is what I did:

0/V
...
cell_membrane_m
{
type groovyBC;
variables "Vs{cell_membrane_s}=sum(V*mag(Sf()))/sum(mag(Sf()));km=0.01;Vm=sum(V*mag(Sf()))/sum(mag(Sf()));";
gradientExpression "km*(Vm-Vs)";
value uniform 0;
fractionExpression "0";
}
cell_membrane_s
{
type groovyBC;
variables "Vm{cell_membrane_m}=sum(V*mag(Sf()))/sum(mag(Sf()));km=0.01;Vs=sum(V*mag(Sf()))/sum(mag(Sf()));";
gradientExpression "km*(Vm-Vs)";
value uniform 0;
fractionExpression "0";
}

As you can see I'm using groovyBC too.

I'm using my own solver, based in lapplacian calculations. But I don't think it is the problem because I used it with other examples and worked well.

The error I get is:

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 double Foam::sumProd<double>(Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::fvMatrix<double>::solveSegregated(Foam::dict ionary const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pnp"
#7 Foam::fvMatrix<double>::solve() in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pnp"
#8
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pnp"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam221/platforms/linux64GccDPOpt/bin/pnp"
Excepción de coma flotante (`core' generado)

Can you help me please? Thank you!

Emmanuel


PD: This is an image about the boundary condition I want to set:

https://www.dropbox.com/s/4ndt1pbm8sa1vtf/membrane.jpg
https://www.dropbox.com/s/4ndt1pbm8sa1vtf/membrane.jpg


All times are GMT -4. The time now is 02:39.