1
$\begingroup$

I want to apply the initial condition below to the linear element

c(x; 0) = sin(10πx); if x in [0; 0:1] and c(x; 0) = 0; if x in [0:1; 1].

I tried like

SMTInputData["Threads" -> 1]; plots = {}; nel = 50; h = 1/nel; L = 1; SMTAddDomain[{"\[CapitalOmega]", name, {"\[Omega] *" -> 1, "ff*" -> 0}}]; SMTMesh["\[CapitalOmega]", "L1", {1/h}, {{0, 0}, {L, 0}}]; SMTAddInitialBoundary["X" < 0.1 && "X" = 0 &, "AM", 1 -> Function[{n, X}, Sin[10*Pi*X]], "Type" -> "InitialCondition"]; SMTAddInitialBoundary["X" > 0.1 && "X" = 1 &, "AP", 1 -> 0, "Type" -> "InitialCondition"]; SMTAnalysis[]; 

But it shows the error like the initial condition format is wrong? Thank you in advance.

$\endgroup$
0

1 Answer 1

1
$\begingroup$
SMTAddInitialBoundary["X" < 0.1 && "X" = 0 &, "AM", 1 -> Function[{n, X}, Sin[10*Pi*X]], "Type" -> "InitialCondition"] 

What is "AM"? It should be

SMTAddInitialBoundary[ "X" < 0.1 && "X" = 0 &, 1 -> Function[{n, X}, Sin[10*Pi*X]], "Type" -> "InitialCondition" ] 
$\endgroup$
2
  • $\begingroup$ This is only for x from 0 to 0.1. what about the second range of x i.e 0.1 to 1? $\endgroup$ Commented Apr 27, 2021 at 23:49
  • $\begingroup$ AM is unknown c. $\endgroup$ Commented Apr 27, 2021 at 23:50

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.