### FSI - conditional definition of stress

79
views
0
6 weeks ago by

Dear all,

I am trying to solve an FSI problem using a special method. I am using a rectangular mesh where a portion is defined as solid and another portion is defined as fluid. I use level set function to distinguish two portions. I have two different stress tensors for fluid and solid. I need to setup the problem such that the stress is calculated conditionally according the two regions. I tried the following:

F = conditional("any condition",solidstress()*dx,fluidstress()*dx)
dF=derivative(F,w)
problem=NonlinearVariationalProblem(F,w,bcs,dF)
solver=NonlinearVariationalSolver(problem)


This results in the following typr of error:

" to any UFL type." % str(expression))
ufl.log.UFLValueError: Invalid type conversion: { f_0 * (f_41 * (((det((grad([f_7[2], f_7[3]]))^-1)) <= (1e-14)) ? (f_44) : ((det((grad([f_7[2], f_7[3]]))^-1)) ** -1.0)) * (([v_0[0], v_0[1]]) : ({ A | A_{i_{12}} = sum_{i_{13}} ([f_7[0], f_7[1]])[i_{13}] * (grad([f_7[0], f_7[1]]))[i_{12}, i_{13}] })) + (({ A | A_{i_{25}, i_{26}} = ((((grad([f_7[2], f_7[3]]))^-1) . (({ A | A_{i_{17}, i_{18}} = (({ A | A_{i_{14}, i_{15}} = sum_{i_{16}} (((grad([f_7[2], f_7[3]]))^-1)^T)[i_{14}, i_{16}] * ((grad([f_7[2], f_7[3]]))^-1)[i_{16}, i_{15}] })^-1)[i_{17}, i_{18}] * (-1.0 + (det((grad([f_7[2])

The code is too long to simplify and share. So, is there a way to be able to do what I need?

Best
Birkan

Community: FEniCS Project
Maybe it helps if you post your definitions for solidstress and fluidstress.
written 6 weeks ago by klunkean