Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have attached a scheme of the problem. Essentially what I need is to plot 2 different vector fields in a single graph with different domains.

The underlying physical problem is to model electric current around and inside a sphere of a different material than the surroundings.

enter image description here

Thanks

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted
Show[
 StreamPlot[{1, 1}, {x, -1, 1}, {y, -1, 1}, RegionFunction -> (Norm[{#, #2}] < 1 &),   
                                BoundaryStyle -> Thick, StreamStyle -> {Thick, Green}],
 StreamPlot[{0, 1}, {x, -2, 2}, {y, -2, 2}, StreamStyle -> {Thick, Red},
                               RegionFunction -> (Abs[#2] < 1.5 && Norm[{#, #2}] > 1 &),  
                               BoundaryStyle -> Thick, 
  , PlotRange -> All, AspectRatio -> Automatic, PlotRangePadding -> Scaled@.1]

enter image description here

share|improve this answer
    
Apparently you found the question :P –  Öskå May 21 at 9:40
    
@Öskå blind shot :p –  Kuba May 21 at 9:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.