The function that defines the initial conditions must contain 6 components, while apparently yours contains only one. 

Luca

Il giorno 18 nov 2023, alle ore 17:29, Aiden Huffman <huffman.ai...@gmail.com> ha scritto:

I should add that in it's current form I get the following error:

An error occurred in line <425> of file <./include/deal.II/numerics/vector_tools_project.templates
.h> in function
    void dealii::VectorTools::internal::do_project(const M_or_MC<dim, spacedim>&, const dealii::Do
FHandler<dim, spacedim>&, const dealii::AffineConstraints<typename VectorType::value_type>&, const
 Q_or_QC<dim>&, const dealii::Function<spacedim, typename VectorType::value_type>&, VectorType&, b
ool, const Q_or_QC<(dim - 1)>&, bool) [with int dim = 2; int spacedim = 2; VectorType = dealii::Ve
ctor<double>; M_or_MC = dealii::Mapping; Q_or_QC = dealii::Quadrature; typename VectorType::value_
type = double]
The violated condition was:
    dof.get_fe(0).n_components() == function.n_components
Additional information:
    Dimension 6 not equal to 1.

Which makes a ton of sense, I have an FESystem not a simple single finite element. I am just not sure what the right object is, or how to build it.

On Saturday, November 18, 2023 at 11:17:28 AM UTC-5 Aiden Huffman wrote:
Hi All,

I am trying to setup a "simple" solver for a Stokes-Cahn-Hilliard problem but I've gotten stuck trying to implement the initial conditions for the color/phase function. The problem looks like the following:
Screenshot from 2023-11-18 11-04-57.png
Where there's a regularized surface tension where the sharp interface would normally be between two fluids. The separate fluids are tracked through the function c. Using a forward Euler scheme, and introducing a dummy variable for the curvature I end up withScreenshot from 2023-11-18 11-06-46.png
The eventual weak form isn't to important yet, since I can't even build the initial conditions. At first I thought to extend Step-22 and use a block system and solve "chunks" of. In particular, solving the stokes update and then solving for the update to the phase function; but I can't figure out how to set the initial conditions for $c^0$. Now I am wondering if the correct approach is to use FETools and separate DoF handlers similar to Step-35.

Any advice or direction would be greatly appreciated. I've included the very barebones implementation I have right now.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/3c854360-3447-415e-ad8c-9d61b630a724n%40googlegroups.com.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/0E8E4D69-64F6-4614-9CD3-455556B95764%40gmail.com.

Reply via email to